The onEach function evaluates each element of the list and returns the original list afterward:
println("Get original list back and print square of each element")
var newNumbers = numbers.onEach{ println(it * it)}
The onEach function evaluates each element of the list and returns the original list afterward:
println("Get original list back and print square of each element")
var newNumbers = numbers.onEach{ println(it * it)}
3.144.91.47