Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Foo {
- def parse(list: List[String]) = list match {
- case "a" :: xs => 1
- case "b" :: Nil => 2
- case ("c" | "d") :: xs => 3
- case "1" :: "2" :: "3" :: Nil => 4
- case "1" :: "2" :: "3" :: xs => 5
- case x :: xs => 6
- case Nil => 7
- }
- }
Add Comment
Please, Sign In to add comment