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

LET forms gen by SLOOP



SLOOP produces LET forms that are not valid in several implementations
of Common Lisp.  For example, in Sun (Lucid) CL, the result of

  (macroexpand-1 '(sloop for x in ll do (f x)))

is:

   (LET ((#:LIS104 LL)
         (X))			;<-- s.b. X or (X NIL)
     (DECLARE (T X))
     (MACROLET NIL
               (BLOCK NIL
                 (TAGBODY
                   SLOOP::NEXT-LOOP (AND (NULL #:LIS104)
                                         (LOCAL-FINISH))
                      (SLOOP::DESETQ X (CAR #:LIS104))
                      (F X)
                      (SETF #:LIS104 (CDR #:LIS104))
                      (GO SLOOP::NEXT-LOOP)
                   SLOOP::FINISH-LOOP))))

Evaluating this form results in:

   >>Error: the argument list does not match lambda list
            (LET-VARIABLE LET-VALUE)

The problem seems to be that variables like X above are intiialized
with the syntax '(var)' instead of '(var nil)' or just 'var'.
 
-- Jeff