[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [External] : Re: List not getting filled up
From: |
Heime |
Subject: |
RE: [External] : Re: List not getting filled up |
Date: |
Mon, 31 Jul 2023 02:59:17 +0000 |
------- Original Message -------
On Monday, July 31st, 2023 at 2:03 PM, uzibalqa <uzibalqa@proton.me> wrote:
> ------- 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 ?
I have just done
(progn
(let* ( (cseq (copy-sequence strg)) )
(message "Output %s %s" strg cseq)
(push (copy-sequence strg) result)))
And the result is always that strg and cseq constitute the same characters.
At no time are they different. So how is pushing one or the other push
something different ?
- Re: List not getting filled up, (continued)
- 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, 2023/07/30
- RE: [External] : Re: List not getting filled up,
Heime <=