Answers to Scala for the Impatient Ch 12 exercises