Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
fiboIterate :: Int -> Integer
fiboIterate n = fst (iterate next (0, 1) !! n)
where next (a, b) = (b, a + b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment