[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 03:11:43 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
tomas wrote:
> (setq thing (copy-sequence '(one two three four five six)))
> (setq thang (cddr thing))
>
> thang => (three four five six)
>
> (nreverse thing) => (six five four three two one)
>
> thing => (one)
>
> thang => (three two one)
> ; now this is what I was after. Who the heck "changed my
> ; variable!?" Who is General Failure and why is he reading
> ; my disk?
Well, let's see, `nreverse' has updated the data without
setting the variables to whatever desired values they should
take so what is left is the variables reference to the first
data item (the car), after that tho 1 doesn't have a cdr
anymore and 3 has '(2 1), not '(4 5 6).
?
--
underground experts united
https://dataswamp.org/~incal
- Appending lists, henri-biard, 2021/06/14
- Re: Appending lists, Pierpaolo Bernardi, 2021/06/14
- Re: Appending lists, Pierpaolo Bernardi, 2021/06/14
- Appending lists, henri-biard, 2021/06/14
- Re: Appending lists, Alexandr Vityazev, 2021/06/14
- Re: Appending lists, Emanuel Berg, 2021/06/14
- Re: Appending lists, Emanuel Berg, 2021/06/15
- Re: Appending lists, tomas, 2021/06/15
- Re: Appending lists,
Emanuel Berg <=
- Re: Appending lists, tomas, 2021/06/16
- Re: Appending lists, Jean Louis, 2021/06/16
- Re: Appending lists, tomas, 2021/06/16
- Re: Appending lists, Jean Louis, 2021/06/16
- Re: Appending lists, Emanuel Berg, 2021/06/16
- Using Emacs for business, Jean Louis, 2021/06/16
- Re: Using Emacs for business, Emanuel Berg, 2021/06/16
- Re: Using Emacs for business, Jean Louis, 2021/06/16
- Re: Using Emacs for business, Emanuel Berg, 2021/06/16
- Re: Using Emacs for business, Jean Louis, 2021/06/17