E.g if I want to write
1 -> 2 match {
case 1 -> 2 => "matched"
case _ => "not matched"
}
// error: not found: value ->
rather than the slightly less obvious
1 -> 2 match {
case (1, 2) => "matched"
case _ => "not matched"
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I have just such a thing! I like it because I find it more readable in many cases.
Now you can do: