Answers to Scala for the Impatient Ch 10 exercises