1 2 3 4 5 6 7 8 9 10 11
object Test { val c0 = false val c1 = true def foo(x: List[Boolean], y: List[Boolean]) = (x,y) match { case (`c0`::x, `c0`::y) => x case (`c0`::x, `c1`::y) => y case (`c1`::x, `c0`::y) => y case (`c1`::x, `c1`::y) => x } }