Skip to content

Instantly share code, notes, and snippets.

@vasily-kirichenko
Created July 12, 2012 17:53
Show Gist options
  • Save vasily-kirichenko/3099646 to your computer and use it in GitHub Desktop.
Save vasily-kirichenko/3099646 to your computer and use it in GitHub Desktop.
Fibonacci in Nemerle
def fib(n)
{
|0|1 => n
|_ => fib(n - 1) + fib(n - 2)
}
foreach (i in $[0..39])
WriteLine("fib({0}) = {1}", i, fib(i));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment