Hello!
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.
Restarts:
0: [ABORT] Return to Top-Level.
Debug (type H for help)
(ANSI-LOOP::LOOP-GET-COLLECTION-INFO LIST LIST LIST)
Source: Error finding source:
Error in function DEBUG::GET-FILE-TOP-LEVEL-FORM: Source file no longer
exists:
target:code/loop.lisp.
0] ba
0: (ANSI-LOOP::LOOP-GET-COLLECTION-INFO LIST LIST LIST)
1: (ANSI-LOOP::LOOP-LIST-COLLECTION LIST)
2: (ANSI-LOOP::GET-CLAUSE IF)
3: (ANSI-LOOP::LOOP-DO-IF IF NIL)
4: (ANSI-LOOP::LOOP-ITERATION-DRIVER)
5: (ANSI-LOOP::LOOP-TRANSLATE (FOR ITEM IN '(1 2 3) WITH ...)
NIL
#<ANSI-LOOP::LOOP-UNIVERSE ANSI {2803973D}>)
6: (MACROEXPAND-1 (LOOP FOR ITEM IN '(1 2 3) ...) NIL)
7: (MACROEXPAND (LOOP FOR ITEM IN '(1 2 3) ...) NIL)
8: (EVAL (LOOP FOR ITEM IN '(1 2 3) ...))
9: (INTERACTIVE-EVAL (LOOP FOR ITEM IN '(1 2 3) ...))
10: (COMMON-LISP::%TOP-LEVEL)
11: (COMMON-LISP::RESTART-LISP)