guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add internal definitions to derived forms


From: Linus Björnstam
Subject: Re: Add internal definitions to derived forms
Date: Fri, 18 Nov 2022 10:50:35 +0100
User-agent: Cyrus-JMAP/3.7.0-alpha0-1115-g8b801eadce-fm-20221102.001-g8b801ead

On Fri, 18 Nov 2022, at 10:27, Lassi Kortela wrote:
>> Would "is like the body of a lambda" be a better wording?
>
> R7RS section 3.5. says:
>
> (lambda <formals> <definition>* <expression>* <tail expression>)
>
> The <definition>* are the stuff you are adding.

Not quite. Guile extends the lambda body (and by extension let-forms) to allow 
mixed definitions and expressions:

(lambda () 
  (display "Heippa!")
  (define routsi #t)
  (and (read) routsi))

which expands to, more or less, a letrec*. All in accordance to the paper 
fixing letrec(reloaded).

Thus saying that the cond clause body is like a lambda body is probably the 
simplest way to express it. 

best regards
Linus Björnstam



reply via email to

[Prev in Thread] Current Thread [Next in Thread]