Add exercise 4.1 to fp-in-scala.