54
Guard using Range:
val m = t match {
case x if 0 until 10 contains x => true
case _ => false
}
Here's another way to match using a range:
val m = t match {
case x if ((0 to 10).contains(x)) => true
case _ => false
}