onEach

Common
JVM
JS
Native
1.4
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)
@ExperimentalUnsignedTypes inline fun UIntArray.onEach(
    action: (UInt) -> Unit
): UIntArray

(source)
@ExperimentalUnsignedTypes inline fun ULongArray.onEach(
    action: (ULong) -> Unit
): ULongArray

(source)
@ExperimentalUnsignedTypes inline fun UByteArray.onEach(
    action: (UByte) -> Unit
): UByteArray

(source)
@ExperimentalUnsignedTypes inline fun UShortArray.onEach(
    action: (UShort) -> Unit
): UShortArray

(source)

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

Common
JVM
JS
Native
1.1
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.

Common
JVM
JS
Native
1.1
inline fun <K, V, M : Map<out K, V>> M.onEach(
    action: (Entry<K, V>) -> Unit
): M

(source)

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