Browse topics
Functional Kotlin
Higher Order Functions
Functions as parameters, inline functions and return types.
higher order functionsHigher Order Function Basics in KotlinHigher-order function takes functions as parameters or returns a function. A Kotlin example with source code and sample output.higher order functionsPassing Function as Parameter in KotlinFunction references can be passed using :: operator. A Kotlin example with source code and sample output.higher order functionsReturning Function from Function in KotlinA function can return another function as its result. A Kotlin example with source code and sample output.higher order functionsinline Functions in Kotlininline keyword asks compiler to copy function body at call site. A Kotlin example with source code and sample output.higher order functionsnoinline and crossinline in Kotlinnoinline prevents a lambda parameter from being inlined. A Kotlin example with source code and sample output.
Related topics
Lambda Expressions Lambda syntax, parameters, return values and anonymous functions. Scope Functions let, run, with, apply and also scope functions explained. Delegates Property delegates, lazy, observable and class delegation. Generics Generic functions, classes, constraints, variance and star projection. Extension Functions Add new behaviour to existing types with Kotlin extension functions and properties.