Working examples of Scala Patterns