Skip to content

Instantly share code, notes, and snippets.

@jamescarr
Created May 31, 2010 21:48
Show Gist options
  • Save jamescarr/420312 to your computer and use it in GitHub Desktop.
Save jamescarr/420312 to your computer and use it in GitHub Desktop.
object Polynomial extends (Int => Int){
override def apply(n:Int) = {
n * (if(n > 1) apply(n-1) else n)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment