Reputation: 12120
Is there a way how I can extract values from a Tuple on the fly?
Let's assume the tuple:
val x = ("1", 2, "3")
and the method:
def doFoo(value1: String, value2: Int, value3: String)={}
How can I call doFoo() with the tuple 'x'? Something like doFoo(x), and the values in the tuple are extracted on the fly to match the method signature.
Upvotes: 1
Views: 590