KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Consider the following Scala code. val a = "both" a match { case "both" | "foo" => println ("foo") // case 1 case "both" | "bar" => println ("bar") // case 2 } I would like match to work so that if a == "both" , Scala will execute both cases. Is this possible or are there any alternatives to achieve what I want?
Tags (comma-separated)
Save Edits
Cancel