Kotlin: using lambdas and higher-order functions

Example:

val numbers = listOf(1, 2, 3, 4, 5)
Kotlin supports higher-order functions and lambdas.

Solution:

val doubled = numbers.map { it * 2 }

Beginner's Guide to Kotlin