IndexedPredicate

fun interface IndexedPredicate<in T>

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

Used by childrenIndexed APIs to allow index-aware predicates without manual forEachIndexed loops — see R27.

Functions

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