sdk-common / com.tomtom.online.sdk.common.func / FuncUtils / forEachIndexed

forEachIndexed

open static fun <T : Any!> forEachIndexed(@NonNull iterable: MutableIterable<T>, @NonNull fun: BlockWithIndex<T>): Unit

Iterate iterable and apply function on each item.

Parameters

iterable - MutableIterable<T>: Iterable

fun - BlockWithIndex<T>: Function which will be applied which contains also the index of the element.