Skip to content

Instantly share code, notes, and snippets.

@dionyziz
Forked from Geekfish/fibo.cj
Created March 30, 2012 06:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dionyziz/2247935 to your computer and use it in GitHub Desktop.
Save dionyziz/2247935 to your computer and use it in GitHub Desktop.
Coffee nth Fibonacci
( f = ( x, y, i ) -> if i then f( y, x + y, i - 1 ) else y )( 1, 1, 1475 )
@Geekfish
Copy link

does it work for 1475 without going to "infinity" ?

Edit & PS:
coffee must replace all js :D

@dionyziz
Copy link
Author

No, Javascript's integers are limited. But, really, this isn't a coffeescript limitation per se; I think the language is nice overall :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment