Josh Huber <huber(a)alum.wpi.edu> writes:
Given this defun:
(defun jmh-test-func ()
(let (tv)
(setq tv '((?a) (?b)))
(push "testme" (cdr (assoc ?a tv)))
tv))
Why does the value returned keep accumulating data from previous
calls?
PLACE variables in CL macros are slightly magic. I think the answer
is that assoc does not have a setf-method, but that only means
something if you have groked the `Basic Setf' node in the CL manual,
and then only barely makes sense.
It would be good if the implementation triggered an error for your
form though, which it does if you remove the cdr.