solutions for Scala for the Impatient