1 2 3 4 5
fib :: Int -> Int fib = (fibs !!) where fibs = 0 : 1 : [fibs !! (i - 2) + fibs !! (i - 1) | i <- [2..]]