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

Re: LIST-LENGTH & circular lists



shivers@xxxxxxxxxxxxx writes:

 > So, there are basically these two levels: pure lists and
 > side-effectable lists.  In the pure-list world, it is not
 > interesting or even well-defined to ask the
 > how-many-elements-in-this-circular-list question. In the
 > side-effectable list world, it makes sense.

In your "pure" world, there's no such thing as a circular list -
there's no distinction basically, btw a circular list & a stream, and
list-length should then return infinity.

But this is scheme, which isn't "pure".  It's not clear to me why the
distinction between a pure list & a "side-effectable" list should be
made.

-- 
Harvey Stein
Bloomberg LP
hjstein@xxxxxxxxxxxxx