Skip to content

Instantly share code, notes, and snippets.

@deque-blog

deque-blog/fiboRecur.hs

Last active May 27, 2017
Embed
What would you like to do?
fiboRecur :: Int -> Integer
fiboRecur = loop 0 1
where
loop !curr !next n
| n == 0 = curr
| otherwise = loop next (curr + next) (n - 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment