preliminary comments Peter McGoron (31 Aug 2026 13:12 UTC)
Re: preliminary comments Hernán Ibarra Mejia (01 Sep 2026 09:37 UTC)
Re: preliminary comments Peter McGoron (01 Sep 2026 11:10 UTC)
Re: preliminary comments Hernán Ibarra Mejia (02 Sep 2026 14:47 UTC)
Re: preliminary comments Peter McGoron (02 Sep 2026 15:18 UTC)
Re: preliminary comments Peter McGoron (01 Sep 2026 18:28 UTC)
Re: preliminary comments Hernán Ibarra Mejia (02 Sep 2026 15:14 UTC)
Re: preliminary comments Marc Nieper-Wißkirchen (03 Sep 2026 08:48 UTC)

Re: preliminary comments Hernán Ibarra Mejia 02 Sep 2026 15:14 UTC

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