forEachIndexed

inline fun forEachIndexed(block: (index: Int, element: Long) -> Unit)(source)

Calls block for each element in the LongList along with its index, in order.

Parameters

block

will be executed for every element in the list, accepting the index and the element at that index.