Barry Margolin <email@example.com> wrote:
| firstname.lastname@example.org (Rob Warnock) wrote:
| > Right. Actually, Scheme gets it right for a Lisp1, with LET/LET*
| > and LETREC instead of CL's LET/LET*/FLET and LABELS. But LETREC
| > and LABELS have different syntaxes and semantics. LETREC binds
| > arbitrary *values*, not functions [though in a Lisp1 a "value"
| > which is an evaluated LAMBDA expression "is" a function], while
| > LABELS binds *only* functions, like FLET.
| But the difference between LET and LETREC is only significant for the
| function values. But I suppose you could get cute and have things like:
| (letrec ((fun1 (lambda ...))
| (list-of-funs (list (lambda ...)
| (lambda ...))))
| fun1 can use ((car list-of-funs) ...).
Exactly. That doesn't work for any variable-binding construct
built into CL.
 Though as I noted, one could write a LETREC macro
in CL that does it the same way Scheme does. The URL
has a reference LETREC macro (in Scheme) that could be
translated to CL fairly easily, I suspect.
Rob Warnock <email@example.com>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607