[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Circular list implementation technique

    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.