Exercise 10.12 Foldable[List] solved