[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "The starting list count" ?????
From: |
Alan Mackenzie |
Subject: |
Re: "The starting list count" ????? |
Date: |
Mon, 3 Jan 2022 18:54:56 +0000 |
Hello, Robin.
On Mon, Jan 03, 2022 at 12:00:29 -0600, Robin Tarsiger wrote:
> Alan Mackenzie wrote:
> > `#N'
> > When printing circular structures, this construct is used to
> > represent where the structure loops back onto itself, and `N' is
> > the starting list count:
> > (let ((a (list 1)))
> > (setcdr a a))
> > => (1 . #0)
> > .. What does this mean, please? What does "is the starting list count"
> > mean? There is only one "list", so what is the "list count"?
> I agree that this is a bit too abbreviated, but basically it's the number
> you'd pass to nthcdr along with the immediately enclosing list to get what's
> spliced in as that last cdr.
Thanks, that's helpful.
> (a b c . #0) ~ (a b c a b c a b c ...)
> (a b c . #1) ~ (a b c b c b c ...)
> (a b c . #2) ~ (a b c c c ...)
> (a b c . #3) ~ <can't happen>
But what about the (1 . #1) I'm seeing? Isn't that the <can't happen>
case? The #1 seems to be "pointing to itself".
I see this in the backtrace after C-g'ing out of the loop.
I get an infinite loop when (1 . #1) gets passed to copy-tree.
> -RTT
--
Alan Mackenzie (Nuremberg, Germany).
- "The starting list count" ?????, Alan Mackenzie, 2022/01/03
- Re: "The starting list count" ?????, Stefan Monnier, 2022/01/03
- Re: "The starting list count" ?????, Alan Mackenzie, 2022/01/03
- Re: "The starting list count" ?????, Stefan Monnier, 2022/01/03
- Re: "The starting list count" ?????, Stefan Monnier, 2022/01/03
- Re: "The starting list count" ?????, Alan Mackenzie, 2022/01/03
- Re: "The starting list count" ?????, Stefan Monnier, 2022/01/03
- Re: "The starting list count" ?????, Alan Mackenzie, 2022/01/03