for Each With Lookahead
inline fun <T> Iterator<T>.forEachWithLookahead(action: (T, Boolean) -> Unit)
Content copied to clipboard
inline fun <T> Iterable<T>.forEachWithLookahead(action: (T, Boolean) -> Unit)
Content copied to clipboard
inline fun <T> Sequence<T>.forEachWithLookahead(action: (T, Boolean) -> Unit)
Content copied to clipboard
Performs the given action on each element, giving a lookahead hint (i.e. if there's another element to process after).