Skip to content

Instantly share code, notes, and snippets.

@Saheb
Created November 26, 2015 19:23
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 Saheb/0f611f8947c1afadf346 to your computer and use it in GitHub Desktop.
Save Saheb/0f611f8947c1afadf346 to your computer and use it in GitHub Desktop.
def fact(n : Int):Int = n match
{
case 1 => 1
case _ => n * fact(n-1)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment