ChainableKtIterableExtensions<T> extension

on

Methods

onEach(void action(T item)) KtIterable<T>

Available on KtIterable<T>, provided by the ChainableKtIterableExtensions extension

Performs the given action on each element. Use with cascade syntax to return self.
onEachIndexed(void action(int index, T item)) KtIterable<T>

Available on KtIterable<T>, provided by the ChainableKtIterableExtensions extension

Performs the given action on each element, providing sequential index with the element, and returns the collection itself afterwards.