[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "The starting list count" ?????
From: |
Robin Tarsiger |
Subject: |
Re: "The starting list count" ????? |
Date: |
Mon, 3 Jan 2022 12:59:56 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 |
Andreas Schwab wrote:
It gets more complicated if the circle is embedded inside another
object.
ELISP> (list (let ((a (list 1))) (setcdr a a)))
((1 . #1))
Foo. You're right, I'd mixed it up with something else.
The number of descent operations necessary from the _outermost_
enclosing list expression to reach the referent, then? ... hmm.
(setq abc (let ((x '(a b c))) (rplacd (cddr x) x))))
abc
==> (a b c . #0)
(cons 'x abc)
==> (x a b c . #1)
(list abc)
==> ((a b c . #1))
(list (list abc))
==> (((a b c . #2)))
(list '(x y z) (list abc))
==> ((x y z) ((a b c . #3)))
(vector '(x y z) (list abc))
==> [(x y z) ((a b c . #2))]
(record 'foo (list abc))
==> #s(foo ((a b c a b . #2)))
Whoa, what happened with that last one?! Is that even intentional?
Alan's definitely right to imply that this needs a better definition.
-RTT