Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created May 27, 2017 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/b955b02526a79933fd762d3a0540cb37 to your computer and use it in GitHub Desktop.
Save deque-blog/b955b02526a79933fd762d3a0540cb37 to your computer and use it in GitHub Desktop.
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