Kotlin supports destructuring declarations:
val (a, b) = Pair(1,2)
This is similar to Python's iterable unpacking:
a, b = (1, 2)
Python also has a splat/spread operator that allows you to perform a similar operation with function arguments:
def f(a, b): pass
pair = (1,2)
f(*pair)
Does kotlin have a similar ability? Obviously, you can unpack the structure manually:
f(pair.component1(), pair.component2())
But that's clunky. Is there a way to do that more elegantly? I don't see anything in the docs on the subject.