[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Appending lists
From: |
Emanuel Berg |
Subject: |
Re: Appending lists |
Date: |
Wed, 16 Jun 2021 18:54:18 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Jean Louis wrote:
> You said vairable did not change, maybe it did not change
> somewhere underground
This is how I understand it:
The variable has a reference to the first cons cell of the
list. The cons cell has a car and a cdr as always, where the
cdr is a reference to the second element of the list, which is
also a cons cell, and so on.
The car of the first element's cons cell remains the same but
the cdr has changed as a side-effect of `nreverse' (or
`nconc').
So when the variable seemingly holding the list, but actually
only holding a reference to the first cons cell, when this
variable is used one will have a different list as a result
even tho the reference is the same, unchanged.
tomas, is this correct? Maybe I won't have to draw the diagram
after all... :)
--
underground experts united
https://dataswamp.org/~incal
- Re: Appending lists, (continued)
- Re: Appending lists, Jean Louis, 2021/06/16
- Re: Appending lists, tomas, 2021/06/16
- Re: Appending lists, Philip Kaludercic, 2021/06/16
- Re: Appending lists, Emanuel Berg, 2021/06/16
- Re: Appending lists, tomas, 2021/06/17
- Re: Appending lists, tomas, 2021/06/17
- Re: Appending lists, Emanuel Berg, 2021/06/16
- Re: Appending lists, Emanuel Berg, 2021/06/16
- [OT] Underground (was: Appending lists), tomas, 2021/06/16
- Re: [OT] Underground (was: Appending lists), Emanuel Berg, 2021/06/18
- Re: Appending lists,
Emanuel Berg <=
- Re: Appending lists, tomas, 2021/06/16
- Re: Appending lists, Jean Louis, 2021/06/16
- Re: Appending lists, Stefan Monnier, 2021/06/16
- Re: Appending lists, Jean Louis, 2021/06/16
- Re: Appending lists, Emanuel Berg, 2021/06/16
- Re: Appending lists, Emanuel Berg, 2021/06/16
- Re: Appending lists, tomas, 2021/06/17
- Re: Appending lists, Emanuel Berg, 2021/06/16
- Re: Appending lists, Emanuel Berg, 2021/06/16
- Re: Appending lists, Stefan Monnier, 2021/06/16