@ExperimentalUnsignedTypes inline fun UIntArray.onEachIndexed( action: (index: Int, UInt) -> Unit ): UIntArray
@ExperimentalUnsignedTypes inline fun ULongArray.onEachIndexed( action: (index: Int, ULong) -> Unit ): ULongArray
@ExperimentalUnsignedTypes inline fun UByteArray.onEachIndexed( action: (index: Int, UByte) -> Unit ): UByteArray
@ExperimentalUnsignedTypes inline fun UShortArray.onEachIndexed( action: (index: Int, UShort) -> Unit ): UShortArray
Performs the given action on each element, providing sequential index with the element, and returns the array itself afterwards.
action
- function that takes the index of an element and the element itself and performs the action on the element.
Performs the given action on each element, providing sequential index with the element, and returns the collection itself afterwards.
action
- function that takes the index of an element and the element itself and performs the action on the element.
inline fun <K, V, M : Map<out K, V>> M.onEachIndexed( action: (index: Int, Entry<K, V>) -> Unit ): M
Performs the given action on each entry, providing sequential index with the entry, and returns the map itself afterwards.
action
- function that takes the index of an entry and the entry itself and performs the action on the entry.
© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/on-each-indexed.html