[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 13:53:21 +0100 |
User-agent: |
Cyrus-JMAP/3.7.0-alpha0-1115-g8b801eadce-fm-20221102.001-g8b801ead |
On Fri, 18 Nov 2022, at 11:22, Lassi Kortela wrote:
> R7RS defines the syntax of `let` et.al. as follows (section 3.5):
>
> (let (<binding spec>*) <tail body>)
>
> Where:
>
> <tail body> = <definition>* <tail sequence>
> <tail sequence> = <expression>* <tail expression>
>
> So their definition of lambda:
>
> (lambda <formals> <definition>* <expression>* <tail expression>)
>
> could be abbreviated:
>
> (lambda <formals> <tail body>)
>
> I haven't read "Fixing letrec" but it looks like Guile intents to
> redefine <tail body> as follows:
>
> <tail body> = <definition-or-expression>* <tail expression>
> <definition-or-expression>* = <definition> | <expression>
>
> R6RS appears to use <tail body> in the same sense as R7RS.
That is a better way to write it indeed. clause-body being equal to a lambda
body.
Thank you.