6 lines
90 B
Text
6 lines
90 B
Text
|
|
factorial : Nat -> Nat
|
||
|
|
factorial x =
|
||
|
|
if x == 0 then 1
|
||
|
|
else
|
||
|
|
x * fac (Nat.drop x 1)
|