import scala.collection.mutable.ArrayBuffer @main def main(): Unit = val inner = ArrayBuffer(1, 2) // both slots hold the SAME buffer val outer = List(inner, inner) outer.head += 9 println(outer(1))
an alias hides inside a collection