exercises from Scala for The Impatients