[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug in copy-list implementation
- To: abegel@media.mit.edu, info-mcl@cambridge.apple.com
- Subject: Re: bug in copy-list implementation
- From: straz (Steve Strassmann)
- Date: Tue, 19 Jul 1994 14:59:31 -0400
(COPY-LIST PROGRAM) doesn't make new copies of PROGRAM's elements,
it just gives you a brand new list pointing to the same old elements.
Thus, you're still sharing structures between (COPY-LIST PROGRAM)
and PROGRAM. Mutations to elements of PROGRAM will show up as
mutations to the copy.
If the elements of PROGRAM are lists, that's why copy-tree
does a better job, because it's making copies of the elements
as well as the outermost list.