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