Returns a new iterator over the items of iter_a. If the end of iter_a is reached, the returned iterator will instead iterate over the items of iter_b. The iterator ends if the ends of both iter_a and iter_b are reached.
Arguments
iter_a - || -> ( #next any | #end any )
iter_b - || -> ( #next any | ... )
Returns
|| -> ( #next any | ... )
Takes all items from iter, counting and returning the number of taken elements from iter when the end is reached.
Arguments
iter - || -> ( #next any | #end any )
Returns
int
Returns an iterator without any elements.
Arguments
Returns
|| -> ( #end unit | ... )
Returns a new iterator where each item is an object holding the next taken item from iter and the number of items that were taken from iter before it. The returned iterator ends when the end of iter has been reached.
Arguments
iter - || -> ( #next any | #end any )
Returns
|| -> ( #next { index = int, value = any } | #end unit | ... )
Returns a new iterator over the items of iter, only including the items for which condition returns true.
Arguments
iter - || -> ( #next any | #end any )
condition - |any| -> bool
Returns
|| -> ( #next any | #end unit | ... )
Takes items from iter until condition returns true for a taken item or the end of iter has been reached. Returns the item for which condition returned true.
Arguments
iter - || -> ( #next any | #end any )
condition - |any| -> bool
Returns
( #some any | #none unit | ... )
Takes all items from iter, returning the last taken item for which condition returned true when the end is reached.
Arguments
iter - || -> ( #next any | #end any )
condition - |any| -> bool
Returns
( #some any | #none unit | ... )
Calls action for each item in iter. Returns when the end of iter has been reached.
Arguments
iter - || -> ( #next any | #end any )
action - |any| -> any
Returns
unit
Takes items from iter until it finds one that is equal to element or the end is reached. Returns true if an element has been found.
Arguments
iter - || -> ( #next any | #end any )
element - any
Returns
bool
Returns an iterator that only returns v once.
Arguments
v - any
Returns
|| -> ( #next any | #end unit | ... )
Takes all items from iter, returning the last taken item when the end is reached.
Arguments
iter - || -> ( #next any | #end any )
Returns
( #some any | #none unit | ... )
Returns a new iterator over the items of iter, where each item is mapped to the result of calling mapping with the item.
Arguments
iter - || -> ( #next any | #end any )
mapping - |any| -> any
Returns
|| -> ( #next any | #end unit | ... )
Takes and returns the next item from iter.
Arguments
iter - || -> ( #next any | #end any )
Returns
( #some any | #none unit | ... )
Starting with the current value being initial, fully exhausts the iterator iter, passing the current value (first argument) and the current item from iter (second argument) to reduction, making the result the new current value. After the end of iter has been reached, the current value is returned.
Arguments
iter - || -> ( #next any | #end any )
reduction - |any, any| -> any
initial - any
Returns
any
Returns an infinite iterator with each item in the sequence being the result of calling f.
Arguments
f - || -> any
Returns
|| -> ( #next any | ... )
Takes and discards the next n elements from iter, returning iter.
Arguments
iter - || -> ( #next any | #end unit )
n - int
Returns
|| -> ( #next any | #end unit )
Returns a new iterator over the items in iter. Ends if either the end of iter has been reached or n elements have been taken from iter.
Arguments
iter - || -> ( #end unit | ... )
n - int
Returns
|| -> ( #end unit | ... )
Returns a new iterator over the items in iter. Ends if either the end of iter has been reached or the function cond returns false when being passed the current item.
Arguments
iter - || -> ( #next any | #end any )
cond - |any| -> bool
Returns
|| -> ( #next any | #end unit | ... )
Returns a new iterator where each item in the sequence is the result of calling combinator with the next items from iter_a and iter_b. The iterator ends if either iter_a or iter_b end.
Arguments
iter_a - || -> ( #next any | #end any )
iter_b - || -> ( #next any | #end any )
combinator - |any, any| -> any
Returns
|| -> ( #next any | #end unit | ... )