On Tue Sep 1, 2026 at 9:24 PM EEST, Peter McGoron wrote:
> I think `let*/m` would be better than `let/m` in that case. The thing
> about `define` that trips me up is that it normally defines a set of
> mutually recursive expressions:
>
> (lambda (n)
> (define (even? n)
> (or (zero? n) (odd? (- n 1))))
> (define (odd? n)
> (and (not (zero? n))
> (even? (- n 1))))
> (write (even? n))
> (newline))
In my book, a `let` should have an explicit body, and `define/m` does not. Also
suffixing a `let` with an asterisk already has a meaning (`let*`, `letrec*`,
`let*-values`), which does not match the meaning here.
> It is also not allowed in R6RS for a body with `define` to `define` the same
> variable more than once.
I am not familiar with R6RS, but this is also the case in R7RS. However, a `let`
also doesn't allow this. I will add a note explaining that redefinitions of the
same variable are allowed with `define/m`.
---
I agree that `define` can feel ambiguous when used inside a body, but in this
case I think it has the right semantics.
Hernán