It’s only possible to pass a collection, an array, an iterable or a sequence as far as I can see. Which is not idealistic when I want to do something like this
Copy code
val list = MutableList<Int>()
when {
someReason() -> list.addAll(1, 2, 3)
someOtherReason() -> list.addAll(4, 5, 6)
}