Exercises for chapter 6 of FPIS

Adding code for exercises in chapter 6 of Functional Programming in Scala