I would like a match with a tuple pattern, but I cannot find any solution for matching using comparison operators. My code is:
myTuple match {
case (-1,-1,true) => ...
case (_>=0,-1,_) => ...
}
This gives a compile time error. I also tried to use if the guard, but, as I see, it can not be used as follows:
case (_ if _>=0,-1,_) => ...
Is my approach right or should I solve it differently? thanks Zoltan
source
share