Test recursion. It works!

This commit is contained in:
Scott Richmond 2022-03-20 19:35:41 -04:00
parent 272951a411
commit b7d49cbf5d

View File

@ -246,6 +246,20 @@
(def source "
fn fib {
(0) -> 1
(1) -> 1
(n) -> add (
fib (sub (n, 1))
fib (sub (n, 2)))
}
fn fact {
(1) -> 1
(n) -> mult (n, fact (sub (n, 1)))
}
fact (6)
")