Advertisement
Guest User

Untitled

a guest
May 5th, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.13 KB | None | 0 0
  1. def factorial(n: Int): Int = {
  2. n match {
  3. case n if n <= 0 => 1
  4. case n => n * factorial(n - 1)
  5. }
  6. }
  7.  
  8. println(factorial(100))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement