Guest User

Untitled

a guest
Jul 21st, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. class Foo {
  2. def parse(list: List[String]) = list match {
  3. case "a" :: xs => xs match {
  4. case "b" :: ys => ys match {
  5. case "c" :: Nil => 1
  6. case _ => 0
  7. }
  8. case _ => 0
  9. }
  10.  
  11. case "d" :: "e" :: "f" :: Nil => 2
  12. case _ => 0
  13. }
  14. }
Add Comment
Please, Sign In to add comment