Add exercise 3.8 to 3.12 to fp-in-scala.