Skip to content

Instantly share code, notes, and snippets.

@vmencik
Created January 17, 2013 08:46
Show Gist options
  • Save vmencik/4554615 to your computer and use it in GitHub Desktop.
Save vmencik/4554615 to your computer and use it in GitHub Desktop.
def factorial(n: Int): Int =
if (n == 0) 1 else n * factorial(n - 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment