Writing a Procedure for Actual Iterative Factorial

factorial-product requires the argument a.

Q: Since it computes a × b!, what special case allows us to compute b!?

A: a = 1.

So to compute the factorial of 4, call:

  (factorial-product 1 4) => 24
To avoid the hassle of the extra argument, let another procedure supply it for you:
  (define factorial
    (lambda (n)
      (factorial-product 1 n)))

  (factorial 4) => 24
In this case factorial is the driver procedure, but factorial-product does all the work, iteratively.