exercieses from Scala For The Impatient