fun <T> Iterator<T>.forEachRemaining(operation: (T) -> Unit): Unit
Performs the given operation on each remaining element. |
|
fun <T, R> Iterator<T>.mapRemaining(transform: (T) -> R): List<R>
Maps remaining values of this Iterator with the help of the given transform functions, returns an empty list if
Iterator.hasNext returns |
|
fun <T, R> Iterator<T>.mapRemainingWithCounter(transform: (index: Int, T) -> R): List<R>
Maps remaining values of this Iterator with the help of the given transform functions where a counter variable
is passed ot the transform function starting by 0; returns an empty list if Iterator.hasNext returns |
|
fun <T : Any> Iterator<T>.toPeekingIterator(): PeekingIterator<T>
Wraps this Iterator into a PeekingIterator and returns it. |