Contents
Cons iterator case.
Contains a head value and a tail that represents the rest of the sequence.
Methods
method void Deconstruct (out A head, out Iterator<A> tail) Source #
Nil iterator case
The end of the sequence.
Fields
field Iterator<A> Default = new Nil() Source #
Properties
Methods
method Iterator<A> Clone () Source #
Clone the iterator so that we can consume it without having the head item referenced. This will stop any GC pressure.
method Iterator<A> Split () Source #
When iterating a sequence, it is possible (before evaluation of the Tail) to Terminate the current
iterator and to take a new iterator that continues on from the current location. The reasons for doing
this are to break the linked-list chain so that there isn't a big linked-list of objects in memory that
can't be garbage collected.
Parameters
| returns | New iterator that starts from the current iterator position | |