Exercise 3.13: Added foldLeft in terms of foldRight too