Files
kotlin-for-java-developers/src/Inline.kt
2025-08-01 10:03:04 +02:00

8 lines
215 B
Kotlin

fun main() {
thisIsInlined { true }
}
// The function is replaced with the contects of the function
// No performance overhead
inline fun thisIsInlined(predicate: (Int) -> Boolean): Int? = 42.takeIf(predicate)