From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Ken Anderson Newsgroups: gmane.lisp.guile.user Subject: Re: macro like "my" in Perl Date: Tue, 02 Jul 2002 11:34:53 -0400 Sender: guile-user-admin@gnu.org Message-ID: <5.0.2.1.2.20020626211956.00afd020@zima.bbn.com> References: <5.0.2.1.2.20020626091345.00afe790@zima.bbn.com> <5.0.2.1.2.20020626091345.00afe790@zima.bbn.com> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: main.gmane.org 1025624420 6418 127.0.0.1 (2 Jul 2002 15:40:20 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 2 Jul 2002 15:40:20 +0000 (UTC) Cc: Timothy Hickey Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17PPlM-0001fP-00 for ; Tue, 02 Jul 2002 17:40:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17PPhN-0000x2-00; Tue, 02 Jul 2002 11:36:13 -0400 Original-Received: from zima.bbn.com ([128.89.72.16]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17PPgF-0000oS-00 for ; Tue, 02 Jul 2002 11:35:03 -0400 Original-Received: from ale.bbn.com (ale [128.89.72.125]) by zima.bbn.com (8.11.4/8.11.4) with ESMTP id g62FYrY02264; Tue, 2 Jul 2002 11:34:53 -0400 (EDT) X-Sender: kanderso@zima.bbn.com X-Mailer: QUALCOMM Windows Eudora Version 5.0.2 Original-To: Lynn Winebarger , guile-user@gnu.org In-Reply-To: <02062609450009.13022@locke.free-expression.org> Errors-To: guile-user-admin@gnu.org X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.user:688 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:688 At 10:45 AM 6/26/2002, Lynn Winebarger wrote: >On Wednesday 26 June 2002 08:15, Ken Anderson wrote: > > In Jscheme, not guile, i recently redefined (define) so that groups of > > internal defines are turned into let* or letrec as appropriate, so you can > > write code without additional indenting: > >How do you handle >(let () > (define (even? x) (if (= x 0) #t (not (odd? (- x 1))))) > (define foo (even? 7)) > (define (odd? x) (if (= x 1) #t (not (even? (- x 1)))))) Rather than let, say define. (define (?) ...) This would be converted into (letrec ((even? (lambda (x) (if (= x 0) #t (not (odd? (- x 1))))))) (let* ((foo (even? 7))) (letrec ((odd? (lambda (x) (if (= x 1) #t (not (even? (- x 1))))))))))) Procedures that refer to each other should be declared in a group, as is usually done with letrec. _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user