Skip to content

Instantly share code, notes, and snippets.

@SeongUgJung
Created January 21, 2015 04:45
Show Gist options
  • Save SeongUgJung/d0450d7a8a7e76162f0d to your computer and use it in GitHub Desktop.
Save SeongUgJung/d0450d7a8a7e76162f0d to your computer and use it in GitHub Desktop.
10!
def factor(x : Int, y: Int):Int = {
if (x == 1) {
return y
} else {
return factor(x-1, x*y)
}
}
factor(10,1)
Int = 3628800
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment