Some code snippets in Scala.