Scala snippets