scala tuple desempacando
Sé que esta pregunta ha surgido muchas veces de diferentes maneras. Pero todavía no está claro para mí. ¿Hay alguna manera de lograr lo siguiente?
def foo(a:Int, b:Int) = {}
foo(a,b) //right way to invoke foo
foo(getParams) // is there a way to get this working without explicitly unpacking the tuple??
def getParams = {
//Some calculations
(a,b) //where a & b are Int
}