Gerardo Sarria <[EMAIL PROTECTED]> writes:
> I have an honest question.
> Why this fails?.... because I think is ok. And I know that it says that
> the variable list-result cannot be used in into clause, but I read I can
> do this, and maybe somebody can help me (the backtrace doesn't help very
> much).
>
> * (defvar one 1)
> ONE
> * (loop for item in '(1 2 3)
> with list-result
> if (not (eq item one))
> collect item into list-result
> finally (return list-result))
>
> Variable LIST-RESULT cannot be used in INTO clause
> Current LOOP context: COLLECT ITEM INTO LIST-RESULT FINALLY.
COLLECT ... INTO automatically creates a variable; just remove WITH:
* (loop for item in '(1 2 3)
if (not (eq item one))
collect item into list-result
finally (return list-result))
(2 3)
--
Regards,
Alexey Dejneka
"Alas, the spheres of truth are less transparent than those of
illusion." -- L.E.J. Brouwer