|
From: | Damien Mattei |
Subject: | Fwd: expression and definition context in Scheme |
Date: | Mon, 29 Aug 2022 12:10:00 +0200 |
On 28-08-2022 08:40, Damien Mattei wrote:
in fact my thought was not clear, perhaps just allow a 'define in an instructions as 'when in my example , 'define-ed variable would then be local one in the block of 'when, will it change something in scheme implementation in a bad way?Are you asking for 'when' to implicitly wrap its body in a (let () ...)?
If so, that's trivial to implement, without changing the Scheme implementation:
(define-syntax-rule (when cond exp ...)
(if cond
(let () exp ...)))Greetings,
Maxime.
[Prev in Thread] | Current Thread | [Next in Thread] |