object MatcherOnTuples extends App { def pointRef(i:Any) = i match { case (x,y, 55) => printf("x y and 55") case (x,y) => printf("Point X %s Y %s \n",x,y) case (3) => printf("This is 3") case (x) => printf("Point X %s \n",x) } pointRef( (1,2) ) pointRef( (3) ) pointRef( false ) pointRef( (3,Int) ) pointRef( (1,"1",55) ) }