Skip to content

Instantly share code, notes, and snippets.

@akaneko3
Last active December 29, 2015 05:39
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 akaneko3/7624013 to your computer and use it in GitHub Desktop.
Save akaneko3/7624013 to your computer and use it in GitHub Desktop.
Factorial with Scala
object Fact {
implicit class RichInt(val n : Int) {
def ! : Int = (1 to n).product
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment