Skip to content

Instantly share code, notes, and snippets.

@shelling
Created August 15, 2011 16:36
Show Gist options
  • Select an option

  • Save shelling/1147145 to your computer and use it in GitHub Desktop.

Select an option

Save shelling/1147145 to your computer and use it in GitHub Desktop.
require("coffee-script")
square = (x) -> x * x
for i in [1..10]
do (i) ->
console.log(square(i));
fib = (x) ->
if x == 0
0
else if x == 1
1
else
fib(x-1) + fib(x-2)
for i in [1..10]
do (i) ->
console.log(fib(i))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment