Browse topics
Functional Kotlin
Lambda Expressions
Lambda syntax, parameters, return values and anonymous functions.
kotlin lambdasLambda Expression Basics in KotlinLambda is a function literal written without a name. A Kotlin example with source code and sample output.kotlin lambdasLambda with Parameters in KotlinLambda parameters are declared before the arrow symbol ->. A Kotlin example with source code and sample output.kotlin lambdasLambda Return Values in KotlinThe last expression in a lambda body is returned automatically. A Kotlin example with source code and sample output.kotlin lambdasAnonymous Functions in KotlinAnonymous functions look like regular functions without a name. A Kotlin example with source code and sample output.kotlin lambdasLambda as Parameter in KotlinFunctions can accept lambda as a parameter. A Kotlin example with source code and sample output.
Related topics
Higher Order Functions Functions as parameters, inline functions and return types. 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.