4 lines
77 B
Text
4 lines
77 B
Text
factorial (n : Int) : Int =
|
|
if n < 2
|
|
then 1
|
|
else n * factorial (n - 1)
|