[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)))


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

Evaluating this form results in:

   >>Error: the argument list does not match lambda list

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