chapter 2; exercise 10 - foldLeft