all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robin Tarsiger <rtt@dasyatidae.com>
To: acm@muc.de
Cc: emacs-devel@gnu.org
Subject: Re: "The starting list count" ?????
Date: Mon, 3 Jan 2022 12:00:29 -0600	[thread overview]
Message-ID: <4b0fc44c-8ef2-e6c8-0146-1497fe43acf7@dasyatidae.com> (raw)
In-Reply-To: <YdM3NMYCDk/YQH1h@ACM>

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



  reply	other threads:[~2022-01-03 18:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-03 17:49 "The starting list count" ????? Alan Mackenzie
2022-01-03 18:00 ` Robin Tarsiger [this message]
2022-01-03 18:33   ` Andreas Schwab
2022-01-03 18:59     ` Robin Tarsiger
2022-01-03 19:24       ` Andreas Schwab
2022-01-03 19:36       ` Eli Zaretskii
2022-01-03 18:54   ` Alan Mackenzie
2022-01-03 19:26     ` Andreas Schwab
2022-01-03 18:05 ` Stefan Monnier
2022-01-03 19:21   ` Alan Mackenzie
2022-01-03 19:50     ` Andreas Schwab
2022-01-03 19:55       ` Alan Mackenzie
2022-01-03 20:38     ` Stefan Monnier
2022-01-03 20:58       ` Stefan Monnier
2022-01-03 21:03       ` Alan Mackenzie
2022-01-03 21:15         ` Stefan Monnier
2022-01-03 21:33           ` Alan Mackenzie
2022-01-04  0:43             ` Stefan Monnier
2022-01-03 18:13 ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4b0fc44c-8ef2-e6c8-0146-1497fe43acf7@dasyatidae.com \
    --to=rtt@dasyatidae.com \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.