implement exercises 1-3 from "FP in Scala" book, chapter 5
implement exercise 4 from "FP in Scala" book, chapter 5
implement exercise 5 from "FP in Scala" book, chapter 5
implement exercises 7-10 from "FP in Scala" book, chapter 5