1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
(let ( (fact-rec (lambda (self val) (let ((next-val (add val (neg 1)))) (if-apply next-val (lambda (x) (mul val (self self next-val))) (lambda (x) 1)) ) ) ) (factorial (lambda (val) (fact-rec fact-rec val))) ) (factorial 5))