[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Appending lists
From: |
Jean Louis |
Subject: |
Re: Appending lists |
Date: |
Wed, 16 Jun 2021 20:36:00 +0300 |
User-agent: |
Mutt/2.0.7+183 (3d24855) (2021-05-28) |
* Philip Kaludercic <philipk@posteo.net> [2021-06-16 16:07]:
> > (setq list '(A B C)) ⇒ (A B C)
> > (nconc list '(1 2 3)) ⇒ (A B C 1 2 3)
> > list ⇒ (A B C 1 2 3)
>
> Change that to
>
(let* ((list-1 '(a b c))
(list-2 (nconc list-1 '(1 2 3))))
(eq list-1 list-2)) ;; => t
eq - Return t if the two args are the same Lisp object.
And we talked how variable's value does not change... values or Lisp
objects?
(setq list-1 '(a b c))
list-1 ⇒ (a b c)
(setq list-2 (nconc list-1 '(1 2 3))) ⇒ (a b c 1 2 3)
list-2 ⇒ (a b c 1 2 3)
(eq list-1 list-2) ⇒ t
list-1 ⇒ (a b c 1 2 3)
How I see that is that it is same lisp object, but I can visually see
that the value changed.
Maybe Thomas wanted to say that lisp object does not change?
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
- Re: Appending lists, (continued)
- Re: Appending lists, Yuri Khan, 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
- Re: Appending lists, Jean Louis, 2021/06/16
- Re: Appending lists, Philip Kaludercic, 2021/06/16
- Re: Appending lists, Emanuel Berg, 2021/06/16
- Re: Appending lists,
Jean Louis <=
- 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, 2021/06/16