// given an immutable List, the callee cannot alter the original
def withExtra(xs: List[Int]): List[Int] =
xs :+ 99
@main def main(): Unit =
val original = List(1, 2)
val result = withExtra(original)
println(s"$original $result")the caller's value cannot change