Solution to the exercises of Functional Programming in Scala, from Mannig Publications