Kotlin: using lambdas
Example:
val list = listOf(1, 2, 3, 4, 5)
Lambdas are a concise way to represent anonymous functions.
Solution:
list.filter { it % 2 == 0 }
Example: Solution:Kotlin: using lambdas
Lambdas are a concise way to represent anonymous functions.
val list = listOf(1, 2, 3, 4, 5)
list.filter { it % 2 == 0 }