Skip to content

Instantly share code, notes, and snippets.

@dvdsgl
Created May 16, 2010 15:51
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 dvdsgl/402947 to your computer and use it in GitHub Desktop.
Save dvdsgl/402947 to your computer and use it in GitHub Desktop.
import System._
object ScalaMono extends Application {
def fib (i: Int): Int = i match {
case 0 | 1 => 1
case i => fib (i - 2) + fib (i - 1)
}
for (i <- 0 until 10) {
val message = String.Format ("Scala on Mono! fib ({0}) = {1}", i, fib (i))
Console.WriteLine (message)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment