Re: The most general form of let/let*
Lassi Kortela 15 Nov 2022 20:23 UTC
BTW, how is self-recursion expressed? These don't work in Scheme:
(let ((! (lambda (n) (if (<= n 1) 1 (* n (! (- n 1)))))))
(! 10))
(let* ((! (lambda (n) (if (<= n 1) 1 (* n (! (- n 1)))))))
(! 10))
We need this:
(letrec ((! (lambda (n) (if (<= n 1) 1 (* n (! (- n 1)))))))
(! 10))
Would you need this:
(let-values (((!) (using ! (lambda (n) (if (<= n 1) 1 (* n (! (- n 1))))))))
(! 10))