Carte du tableau Kotlin

/* 
The mapping transformation creates a collection from the results of a 
function on the elements of another collection.*/

val numbers = setOf(1, 2, 3)
println(numbers.map { it * 3 })	// [3, 6, 9]
println(numbers.mapIndexed { idx, value -> value * idx })	// [0, 2, 6]

an-jorge