Instead, you can take a tuple as an argument to a function:
def myDef(abc: (A,B,C)): D = abc match { case ('qxpf, _, _) => ??? case _ => ??? }
Users will have their argument lists without tuples, automatically promoted to tuples. Note:
scala> def q(ab: (Int,String)) = ab.swap q: (ab: (Int, String))(String, Int) scala> q(5,"Fish") res1: (String, Int) = (Fish,5)
source share