[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Circular list implementation technique
- To: primerd!DOUG@ENX.Prime.PDN
- Subject: Circular list implementation technique
- From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Mon, 30 Mar 87 14:28 EST
- Cc: COMMON-LISP@SAIL.STANFORD.EDU
- In-reply-to: <8703301541.AA08877@primerd.prime.com>
Date: 30 Mar 87 09:35:33 EST
From: primerd!DOUG@ENX.Prime.PDN
How can one handle circular lists indescriminately in sequence
functions? It seems to me that at minimum the function must record or
mark each cons to avoid a recursive loop. Am I missing an obvious point?
See the example code on page 265 of CLtL. This technique doesn't come for
free, but it's more efficient than some more obvious techniques.