Changed from using bit-shifts to using arithmetic operators. More tests fail, but...

This commit is contained in:
Simon Brooke 2025-03-16 09:38:00 +00:00
parent bef9be4914
commit 7c84cb433a
3 changed files with 10 additions and 8 deletions

View file

@ -1,6 +1,6 @@
(set! fact
(lambda (n)
"Compute the factorial of `n`, expected to be an integer."
"Compute the factorial of `n`, expected to be a natural number."
(cond ((= n 1) 1)
(t (* n (fact (- n 1)))))))