Bruce Butterfield <email@example.com> wrote:
| The more general question I had, however, I'll restate: is there a
| more 'CL-like' way to do this or is the answer to mimic named let?
No, using LABELS as a transliteration of named-LET is perfectly
fine, provided that you don't depend on the tail-call optimization
property that Scheme promises with named-LET.
Actually, LABELS is really closer to Scheme's LETREC, in that
it allows mutual recursion between more than one function (which
named-LET doesn't!). But LABELS isn't a perfect direct translation
of LETREC, since the latter can be used to bind *both* function
and variable values, whereas in CL those need separate forms.
So you might have to do a bit of data flow analysis to tease
apart a horrendously-complex LETREC into an equivalent set of
nested LET & LABELS forms.
Rob Warnock <firstname.lastname@example.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607