Ex. 1.32: sum and product using accumulate-iter