Contents

Scala cookbook

val a = (0 until 10)
: a: Range = Range(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
println(a.map(i => i + 10))
: Vector(10, 11, 12, 13, 14, 15, 16, 17, 18, 19)