Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumKotlincrossinline noinlineSingle-choice MCQ

In this function, why must `predicate` be marked `noinline`?

inline fun process( items: List<Int>, action: (Int) -> Unit, noinline predicate: (Int) -> Boolean ) { val saved: (Int) -> Boolean = predicate items.filter(saved).forEach(action) }