chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Fix for #989 and hopefully #877 too


From: John Cowan
Subject: Re: [Chicken-hackers] [PATCH] Fix for #989 and hopefully #877 too
Date: Thu, 7 Nov 2013 11:40:44 -0500
User-agent: Mutt/1.5.20 (2009-06-14)

"Jörg F. Wittenberger" scripsit:

> (Now I've got a different problem… rscheme is still supposed to run
> this code. But I'm not inclined to add letrec* support to rscheme.
> :-/ )

You don't need to.  Letrec* was born from the realization that many R5RS
Schemes that were claiming to implement letrec were actually giving
it the semantics of letrec*.  So when a Scheme switches from letrec
to letrec-plus-letrec* as a basis, it may be necessary to convert some
instances of letrec to letrec*.  Then again, if the implementation of
letrec was correct to begin with, no change is needed -- but your code
wouldn't have worked anyway.

So for RScheme purposes, just write a trivial syntax-rules macro:

(define-syntax letrec*
  (syntax-rules ()
    ((letrec* . x) (letrec . x))))

(This requires loading the RScheme syntax-rules support.)

-- 
John Cowan              address@hidden          http://www.ccil.org/~cowan
Most people are much more ignorant about language than they are about
[other subjects], but they reckon that because they can talk and read and
write, their opinions about talking and reading and writing are as well
informed as anybody's.  And since I have DNA, I'm entitled to carry on at
length about genetics without bothering to learn anything about it.  Not.
                        --Mark Liberman



reply via email to

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