help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [External] : Re: Appending lists


From: Drew Adams
Subject: RE: [External] : Re: Appending lists
Date: Wed, 16 Jun 2021 17:54:30 +0000

> "Copy", you mean to send the value as an argument?

I mean create a separate object.
`copy-sequence' does that, for example.

> What's a "deep copy"?

It's a copy where every part of the object
is separate, not `eq' to the corresponding
parts of the object that you copied.

For a cons, which is a tree, it would mean
that neither car nor cdr are shared between
the original and the copy, and that the same
is true for any cars and cdrs that are,
themselves, conses.

IOW, the tree is separate/independent from
its copy.  When that's the case you can
change any parts of either without affecting
the other.

`C-h f copy-tree' describes the difference
between what it does (a deep copy) and what
`copy-sequence' does (shallow copy - doesn't
copy cars.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]