Scala pattern matching examples