examples at Scala-by-example(2014)