Files
monkey/examples/factt.monkey
Chuck Smith 6282075e66
Some checks failed
Build / build (push) Successful in 10m26s
Test / build (push) Failing after 16m44s
bind expression (:=) instead of let
2024-03-21 17:43:03 -04:00

8 lines
100 B
Plaintext

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