Created
July 4, 2016 14:12
-
-
Save Yuemashi/7c6bdda91a40b59fdb3d27243c88b0b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fib = -> n { | |
return n if n < 2 | |
fib[n - 2] + fib[n - 1] | |
} | |
fib[10] | |
=> 55 | |
fib[32] | |
=> 2178309 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment