exercise 1.32 accumulate