Working through the book Programming in Scala (second edition)