|
From: | Robin Tarsiger |
Subject: | Re: "The starting list count" ????? |
Date: | Mon, 3 Jan 2022 12:00:29 -0600 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 |
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. (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> -RTT
[Prev in Thread] | Current Thread | [Next in Thread] |