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: Emanuel Berg
Subject: Re: [External] : Re: Appending lists
Date: Thu, 17 Jun 2021 01:49:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Drew Adams wrote:

>> 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.

deep copy = actual copy

shallow copy = copy of references?

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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