We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Fibonacci Numbers
Fibonacci Numbers
+ 0 comments Easy in Haskell
fib n = fibs !! (n -1) where fibs = 0:1:[(a+b)|(a, b) <- zip fibs (tail fibs)]
+ 0 comments Why utilize this (off-base) decision of records? The Fibonacci numbers should begin with f(0) = 0, f(1) = 1, if by some stroke of good luck for tasteful reasons,monitoredged similar to the gcd-property. Gratitude for the video interface btw.
+ 0 comments F# solution
open System let rec f n = match n with | 1 -> 0 | 2 -> 1 | n -> f (n - 1) + f (n - 2) [<EntryPoint>] let main argv = Console.ReadLine() |> int |> f |> Console.WriteLine 0
+ 0 comments This is a great source here.
+ 0 comments I am a new learner here , can you help me.
Load more conversations
Sort 57 Discussions, By:
Please Login in order to post a comment