// the list is shared, so this change is visible to the caller fun addZero(v: MutableList<Int>) { v.add(0) } fun main() { val nums = mutableListOf(1, 2) addZero(nums) println(nums) }
the callee shares the same object