Append the given iterator to this iterator.
Runs the iterator sequence effect (flatMap
) of functions on this iterator.
Runs the iterator sequence effect (flatMap
) of functions on this iterator. Synonym for ap
.
Runs the iterator sequence effect (flatMap
) of functions on this iterator.
Runs the iterator sequence effect (flatMap
) of functions on this iterator. Synonym for <*>:
.
Return the first element in the iterator satisfying the given predicate, mapping the given function.
True if any elements of the iterator are equal to the given value.
Copies this iterator to an array at the given interval.
Copies this iterator to an array at the given interval.
Drop at most the given number of elements from the front of the iterator.
Drop elements from the front of the iterator satisfying the given predicate.
Creates two new iterators that both iterate over the same elements as this iterator (in the same order).
Creates two new iterators that both iterate over the same elements as this iterator (in the same order). The duplicate iterators are considered equal if they are positioned at the same element.
True if any elements of the iterator satisfy the given predicate.
True if any elements of the iterator satisfy the given predicate.
Return an iterator with only the elements satisfying the predicate.
Return an iterator with only the elements not satisfying the predicate.
Return the first element in the iterator satisfying the given predicate.
Return the first element in the iterator satisfying the given predicate.
Sequence an iterator function on all elements of the iterator.
Flatten an iterator of iterator.
True if all elements of the iterator satisfy the given predicate.
True if all elements of the iterator satisfy the given predicate.
Execute an effect for each element of the iterator.
Execute an effect for each element of the iterator.
A non-empty iterator always has a definite size.
A non-empty iterator always has a definite size.
True if this iterator can produce a value from next
.
Return the index (starting at 0) of the first element in the iterator equal to the given value or -1 if no such element exists.
Return the index (starting at 0) of the first element in the iterator satisfying the given predicate or -1 if no such element exists.
The negation of hasNext
.
The negation of hasNext
.
A non-empty iterator is never traversable again.
A non-empty iterator is never traversable again.
Return the number of elements in the iterator.
Map a function on all elements of the iterator.
Produces a value if possible, or throws an exception if not possible.
Produces a value if possible, or throws an exception if not possible. The method hasNext
determines if a value can be produced.
Appends an element value to the iterator until a given target length is reached.
Partition the iterator into those satisfying a predicate and those that do not.
True if this iterator produces equal elements to the given iterator in the same order.
Produces an iterator containing cumulative results of applying the operator going left to right.
Produces an iterator containing cumulative results of applying the operator going left to right, starting at head.
Return a regular iterator, losing the non-empty invariant in the type.
Return a regular iterator, losing the non-empty invariant in the type.
Runs the iterator of functions to produce a function to iterators.
Returns an interval of elements in the iterator.
Split the iterator, taking from the front while the given predicate satisfies.
Take at most the given number of elements from the front of the iterator.
Take elements from the front of the iterator satisfying the given predicate.
Return a regular iterator, losing the non-empty invariant in the type.
Return a regular iterator, losing the non-empty invariant in the type.
Convert this iterator to a stream.
Convert this iterator to a stream.
Returns a stream of this iterator.
Returns a stream of this iterator.
Return an iterator with only the elements satisfying the predicate.
Zip this iterator with the given iterator to produce an iterator of pairs.
Creates an iterator formed from this iterator and another iterator by combining corresponding elements in pairs.
Zip this iterator with the infinite iterator from 0 incrementing by 1, to produce an iterator of pairs.
A non-empty iterator contains at least one element. Consequences include:
-
reduceLeft
will always produce a value. -first
will always produce a value. -next
will always produce a value on its first invocation. -hasNext
will always return true on its first invocation. -scanLeft1
will always produce a value.Some operations on a non-empty iterator result in a non-empty iterator.
Construction of an
Iterator1
is typically performed with the+::
method, defined onIterator1.RichIterator
.For example:
NOTE: Most Iterator functions perform SIDE-EFFECTS and so EQUATIONAL REASONING DOES NOT APPLY.