kbox-android / ch.tutteli.kbox / kotlin.collections.Iterator / mapRemaining

mapRemaining

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 false for the first call.

Return
A List of the mapped remaining values.