Completed Coursera: Kotlin for developers course

This commit is contained in:
Martin Berg Alstad
2025-07-30 14:34:03 +02:00
committed by Martin Berg Alstad
commit 64d9e4ada7
41 changed files with 608 additions and 0 deletions

7
src/Inline.kt Normal file
View File

@ -0,0 +1,7 @@
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)