I've found a strange behavior in Clozure Common Lisp (but it's the same in Lispworks): if I apply "delete" function on a variable, the function returns the correct value, but, wherever the deleting item is the list first element, in the new variable value the item is deleted but not on the first index. Why?
Code: Select all
? (setf a '(1 2 3 2 1 2))
(1 2 3 2 1 2)
? a
(1 2 3 2 1 2)
? (delete 1 a)
(2 3 2 2)
? a
(1 2 3 2 2)
? (delete 2 a)
(1 3)
? a
(1 3)
?