Created
October 30, 2016 04:19
-
-
Save SoftwareDevPro/6234f7dd2c0f5b49916850ac0dbd7e1b to your computer and use it in GitHub Desktop.
Fibonacci sequence implemented in CoffeeScript
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
# Filed under: 140bytes, fibonacci, recursive | |
# calculate fibonacci (recursively) | |
fibonacci = (n) -> | |
if n > 1 then f(n - 1) + f(n - 2) else n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment