Skip to content

Instantly share code, notes, and snippets.

@htsign
Last active May 2, 2016 12:18
Show Gist options
  • Save htsign/18d6359c4065b159de30 to your computer and use it in GitHub Desktop.
Save htsign/18d6359c4065b159de30 to your computer and use it in GitHub Desktop.
fib = n ->
[p, c] = [0, 1]
for i in [0..(n - 1)]
[p, c] = [c, p + c]
yield c
for i of fib 10
console.log i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment