[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [External] : Re: List not getting filled up
From: |
Drew Adams |
Subject: |
RE: [External] : Re: List not getting filled up |
Date: |
Mon, 31 Jul 2023 01:40:57 +0000 |
> Upon further introspection I found that it makes a lot of difference
> whether I use
>
> (push (copy-sequence string) result)
> or
> (push string result)
>
> Why is that ?
Because of just what everyone's been saying:
If you add the string to the list then you
add the same string each time, because the
variable `string' refers to the same Lisp
object (same string), as shown by `eq'.
If you add a copy of the string the copy
reflects the current state of the string.
As I wrote:
(eq foo (copy-sequence foo)) ; -> nil
- List not getting filled up, uzibalqa, 2023/07/28
- Re: List not getting filled up, tpeplt, 2023/07/30
- Re: List not getting filled up, uzibalqa, 2023/07/30
- Re: List not getting filled up, Yuri Khan, 2023/07/30
- Re: List not getting filled up, uzibalqa, 2023/07/30
- RE: [External] : Re: List not getting filled up, Drew Adams, 2023/07/30
- RE: [External] : Re: List not getting filled up, uzibalqa, 2023/07/30
- RE: [External] : Re: List not getting filled up, Drew Adams, 2023/07/30
- RE: [External] : Re: List not getting filled up, uzibalqa, 2023/07/30
- RE: [External] : Re: List not getting filled up,
Drew Adams <=
- RE: [External] : Re: List not getting filled up, uzibalqa, 2023/07/30
- RE: [External] : Re: List not getting filled up, Heime, 2023/07/30