Skip to content

Instantly share code, notes, and snippets.

@SoftwareDevPro
Created October 30, 2016 04:19
Show Gist options
  • Save SoftwareDevPro/6234f7dd2c0f5b49916850ac0dbd7e1b to your computer and use it in GitHub Desktop.
Save SoftwareDevPro/6234f7dd2c0f5b49916850ac0dbd7e1b to your computer and use it in GitHub Desktop.
Fibonacci sequence implemented in CoffeeScript
# 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