Working through the chapters of Functional Programming in Scala