I have a slow morning. I thought that the link to the existing shaft in the statement of the case would be in order. But this seems to be interpreted as defining a local variable. A rudimentary googling did not help, and I do not have my staircase book with me.
What follows is what is the syntax that would allow me to match on case (b, c)?
scala> val (a,b,c) = (1,2,3) a: Int = 1 b: Int = 2 c: Int = 3 scala> (2,3) match { | case (a,b) => 100 | case (b,c) => 200 | case _ => 999 | } <console>:8: error: unreachable code case (b,c) => 200
source share