onEach

inline fun <T> Array<out T>.onEach(action: (T) -> Unit): Array<out T>(source)
inline fun ByteArray.onEach(action: (Byte) -> Unit): ByteArray(source)
inline fun ShortArray.onEach(action: (Short) -> Unit): ShortArray(source)
inline fun IntArray.onEach(action: (Int) -> Unit): IntArray(source)
inline fun LongArray.onEach(action: (Long) -> Unit): LongArray(source)
inline fun FloatArray.onEach(action: (Float) -> Unit): FloatArray(source)
inline fun DoubleArray.onEach(action: (Double) -> Unit): DoubleArray(source)
inline fun BooleanArray.onEach(action: (Boolean) -> Unit): BooleanArray(source)
inline fun CharArray.onEach(action: (Char) -> Unit): CharArray(source)

Performs the given action on each element and returns the array itself afterwards.

Since Kotlin

1.4

inline fun <T, C : Iterable<T>> C.onEach(action: (T) -> Unit): C(source)

Performs the given action on each element and returns the collection itself afterwards.

Since Kotlin

1.1

inline fun <K, V, M : Map<out K, V>> M.onEach(action: (Map.Entry<K, V>) -> Unit): M(source)

Performs the given action on each entry and returns the map itself afterwards.

Since Kotlin

1.1