Files
monkey/examples/factt.monkey
Chuck Smith 0b1ed43ae5
Some checks failed
Build / build (push) Successful in 2m1s
Test / build (push) Failing after 11m48s
Demo changes
2024-03-18 20:00:14 -04:00

8 lines
104 B
Plaintext

let fact = fn(n, a) {
if (n == 0) {
return a
}
return fact(n - 1, a * n)
}
print(fact(5, 1))