chapter 2; exercise 11 - length, sum and product using foldLeft