Skip to content

Instantly share code, notes, and snippets.

@perezd
Created February 27, 2009 18:30
Show Gist options
  • Save perezd/71622 to your computer and use it in GitHub Desktop.
Save perezd/71622 to your computer and use it in GitHub Desktop.
object ScalaFib extends Application {
def fibo(n:Int) : Int = {
if (!(n>2)) n else fibo(n-1)+fibo(n-2);
}
for (i <- 0 until 30) {
println(fibo(i));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment