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 => xs match {
- case "b" :: ys => ys match {
- case "c" :: Nil => 1
- case _ => 0
- }
- case _ => 0
- }
- case "d" :: "e" :: "f" :: Nil => 2
- case _ => 0
- }
- }
Add Comment
Please, Sign In to add comment