bobbylisp/example/fact.hlm

8 lines
108 B
Plaintext

func fact (n : num) num =
if n == 0 then
1
else
n * fact(n - 1)
;
println(fact(5));