IndexedIntMapper

fun interface IndexedIntMapper<in T>

Maps collection item metadata with index to an Int. Unlike (Int, T) -> Int, this compiles to a primitive int return and avoids boxing when invoked for every item.

Functions

Link copied to clipboard
abstract fun map(index: Int, item: T): Int