Is it possible to match on a comparison using the pattern matching system in Scala? For example:
a match {
case 10 => println("ten")
case _ > 10 => println("greater than ten")
case _ => println("less than ten")
}
The second case statement is illegal, but I would like to be able to specify "when a is greater than".