forEachRemaining

inline fun <T> Iterator<T>.forEachRemaining(operation: (T) -> Unit)(source)

Performs the given operation on each remaining element.

It corresponds to the default implementation introduced in jdk8 but is inlined. It is meant jvm targets < jdk8 or other platforms.