Added some initial code from the Scala chapter