lots o fixes
This commit is contained in:
8
examples/fact.m
Normal file
8
examples/fact.m
Normal file
@@ -0,0 +1,8 @@
|
||||
fact := fn(n) {
|
||||
if (n == 0) {
|
||||
return 1
|
||||
}
|
||||
return n * fact(n - 1)
|
||||
}
|
||||
|
||||
assert(fact(5) == 120, "fact(5) != 120")
|
||||
Reference in New Issue
Block a user