I'm facing some problems understanding the results of a few experiments with nconc.
(setf x '(a b c))
(setf y '(1 2 3))
(nconc x y) ; => x = (A B C 1 2 3), y = (1 2 3)
From what I've read, nconc changes the rest field of x to point to y.
(setf (nth 1 y) 10) ; => x = (A B C 1 10 3), y = (1 10 3)
So far, so good.
(setf y '(4 5 6)) ; => x = (A B C 1 10 3) y = (4 5 6)
Why does x still reference to the old cons cell, or in other words does the reassignment of y not just change the data at the address of y?
Thanks in advance Michael