Last active
April 8, 2018 02:53
-
-
Save bradvogel/c3cf9ac661f5c9840096 to your computer and use it in GitHub Desktop.
Fibonacci
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
function fib(n) { | |
return function(n, a, b) { | |
return n > 0 ? arguments.callee(n - 1, b, a + b) : a; | |
}(n, 0, 1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment