Smatchcube's website 🌍


Exercise 1.32

a. Recursive version of accumulate:

We show how we can rewrite the sum and product procedures using accumulate:

b. Iterative version of accumulate: