I am trying to understand the function "substitute" in LISP, but there is something that I don't understand. When I perform this:
(defparameter *mytree* nil)
(push 1 *mytree*)
(substitute '8 '1 *mytree*)
Everything runs ok, the value of mytree is (8).
But, when I perform:
(defparameter *mytree* nil)
(push "A" *mytree*)
(substitute '8 '"A" *mytree*)
Then mytree is ("A") instead of (8) like I expect.
Any idea why this is happening?