This Iterator will take an Iterator and split it into subiterators, where each subiterator
contains all contiguous elements that have the same span as defined by the getSpan function.
This Iterator will take an Iterator and split it into subiterators, where each subiterator
contains all contiguous elements that have the same span as defined by the getSpan function.
For example:
Passing in an Iterator(1, 1, 1, 2, 2, 3) with a span function of identity will yield:
This Iterator will take an Iterator and split it into subiterators, where each subiterator contains all contiguous elements that have the same span as defined by the getSpan function.
For example:
Passing in an Iterator(1, 1, 1, 2, 2, 3) with a span function of
identity
will yield:If there are multiple elements that have the same span, but they are not contiguous then they will be returned in separate subiterators.
For example:
Passing in an Iterator(1,2,1,2) with a span function of
identity
will yield:Contiguous is defined by the Iterator.span function:
the type of the item
the type of the span
scala.collection.Iterator.span