From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lassi Kortela Newsgroups: gmane.lisp.guile.devel Subject: Re: Add internal definitions to derived forms Date: Fri, 18 Nov 2022 12:22:09 +0200 Message-ID: <8187541f-a4e0-2f26-e8b7-df7fb82bb9f0@lassi.io> References: <2f38c5ea-0cb6-494e-b680-70b39c3291fb@app.fastmail.com> <38A58B58-3E5C-48EA-A108-1255982789DF@sarc.name> <39109fe3-4f7f-8d07-51ba-f9f993ab5c0d@lassi.io> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36102"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Fri Nov 18 11:22:49 2022 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ovyWH-0009GG-It for guile-devel@m.gmane-mx.org; Fri, 18 Nov 2022 11:22:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovyVp-0001uC-Dh; Fri, 18 Nov 2022 05:22:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovyVn-0001ts-H5 for guile-devel@gnu.org; Fri, 18 Nov 2022 05:22:19 -0500 Original-Received: from relay10.mail.gandi.net ([217.70.178.230]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovyVl-0007Yk-Cw for guile-devel@gnu.org; Fri, 18 Nov 2022 05:22:19 -0500 Original-Received: (Authenticated sender: lassi@lassi.io) by mail.gandi.net (Postfix) with ESMTPSA id 9568D240005 for ; Fri, 18 Nov 2022 10:22:11 +0000 (UTC) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=217.70.178.230; envelope-from=lassi@lassi.io; helo=relay10.mail.gandi.net X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_ABUSE_SURBL=1.25 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:21483 Archived-At: > 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. R7RS defines the syntax of `let` et.al. as follows (section 3.5): (let (*) ) Where: = * = * So their definition of lambda: (lambda * * ) could be abbreviated: (lambda ) I haven't read "Fixing letrec" but it looks like Guile intents to redefine as follows: = * * = | R6RS appears to use in the same sense as R7RS.