Answers to exercises in http://www.scala-lang.org/docu/files/ScalaByExample.pdf