copy-list

あやうく copy-list をマクロで作りかけた、、、

[1]> (setf a "a")
"a"
[2]> (setf ab '(a b))
(A B)
[3]> (setf (car ab) a)
"a"
[4]> (setf ax '(a b))
(A B)
[5]> (setf (car ax) a)
"a"
[6]> ab
("a" B)
[7]> ax
("a" B)
[8]> (eq (car ab) (car ax))
T
[9]> (setf cab (copy-list ab))
("a" B)
[10]> (eq (car ab) (car cab))
T
[11]> (setf (car ab) "a")
"a"
[12]> (eq (car ab) (car cab))
NIL
[13]>

本体をコピーするわけではない。つまり浅いコピーってやつだ。