DELETE is destructive — but not always?
问题 I'm a little confused about Common Lisp's destructive DELETE function. It seems to work as expected, except for if the item is the first item on the list: CL-USER> (defvar *test* (list 1 2 3)) *TEST* CL-USER> (delete 1 *test*) (2 3) CL-USER> *test* (1 2 3) CL-USER> (delete 2 *test*) (1 3) CL-USER> *test* (1 3) 回答1: "Destructive" does not mean "operates in place". It means that the structure of the value operated on might be modified in some arbitrary and often undefined way. This can in some