Files
monkey/examples/fact.m
csmith 862119e90e
Some checks failed
Build / build (push) Successful in 9m50s
Publish Image / publish (push) Failing after 49s
Test / build (push) Successful in 10m55s
lots o fixes
2024-04-01 18:18:45 -04:00

8 lines
117 B
Mathematica

fact := fn(n) {
if (n == 0) {
return 1
}
return n * fact(n - 1)
}
assert(fact(5) == 120, "fact(5) != 120")