You are viewing a single comment's thread. Return to all comments →
My solution in Haskell, with lazy evaluation:
fib :: Int -> Int fib n = last $ take n fibs where fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
Seems like cookies are disabled on this browser, please enable them to open this website
Fibonacci Numbers
You are viewing a single comment's thread. Return to all comments →
My solution in Haskell, with lazy evaluation: