Completed exercises 3.10 and 3.11, foldLeft implementation and sum, product, length in terms of foldLeft