[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [External] : Re: List not getting filled up
From: |
uzibalqa |
Subject: |
RE: [External] : Re: List not getting filled up |
Date: |
Mon, 31 Jul 2023 02:03:57 +0000 |
------- Original Message -------
On Monday, July 31st, 2023 at 1:40 PM, Drew Adams <drew.adams@oracle.com> wrote:
> > 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'.
This is certainly defeating me.
> If you add a copy of the string the copy
> reflects the current state of the string.
string is being passed as argument to function permute, how does it not reflect
its current state ?
> As I wrote:
> (eq foo (copy-sequence foo)) ; -> nil
Could I have a real example of how they would be different ?
- 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, 2023/07/30
- RE: [External] : Re: List not getting filled up,
uzibalqa <=
- RE: [External] : Re: List not getting filled up, Heime, 2023/07/30