[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Something out for which to watch
- To: Clisp mailing list <clisp-list@ma2s2.mathematik.uni-karlsruhe.de>
- Subject: Something out for which to watch
- From: Peter Dudey <pdudey@jupiter.Willamette.EDU>
- Date: Sat, 1 May 1993 12:22:48 -0700 (PDT)
If you use a function like this:
(defun foo (x) (delete x '(a b c d e f)))
the quoted list '(a b c d e f) is NOT immune to the delete! Running the
function could actually change it!
I'm not sure if this is a bug in CLISP or not--I was under the impression
that a quoted, explicit list like that was a constant, and would be
"re-created" every time the function was run.
Anyway, the problem can of course be solved by using "remove" instead. I
would never have been able to find this bug in my program without STEP, which
revealed that my list had somehow changed...
! Peter Dudey, 11 kyu, Lisp SubGuru, Order of the Golden Parentheses \FINGER !
! Reformed Church of James "Eric" the Half-a-Bee, Dipped in Curry \ME !
! "A shadowy flight into the dangerous world of a man who does not exist." !
! Please mail me plastic spaceships: 900 State St. C-210, Salem, OR 97301 !