onEach

inline fun <T> Array<out T>.onEach(action: (T) -> Unit): Array<out T>
inline fun ByteArray.onEach(action: (Byte) -> Unit): ByteArray
inline fun ShortArray.onEach(action: (Short) -> Unit): ShortArray
inline fun IntArray.onEach(action: (Int) -> Unit): IntArray
inline fun LongArray.onEach(action: (Long) -> Unit): LongArray
inline fun FloatArray.onEach(action: (Float) -> Unit): FloatArray
inline fun DoubleArray.onEach(action: (Double) -> Unit): DoubleArray
inline fun BooleanArray.onEach(action: (Boolean) -> Unit): BooleanArray
inline fun CharArray.onEach(action: (Char) -> Unit): CharArray
inline fun UIntArray.onEach(action: (UInt) -> Unit): UIntArray
inline fun ULongArray.onEach(action: (ULong) -> Unit): ULongArray
inline fun UByteArray.onEach(action: (UByte) -> Unit): UByteArray
inline fun UShortArray.onEach(action: (UShort) -> Unit): UShortArray

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

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

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

Since Kotlin

1.1