(define num-times-range (lambda (a low high) ; compute a × (low × low+1 × ... × high) as (if (> low high) ; (a × low) × (low+1 × ... × high) a (num-times-range (* a low) (+ low 1) high))))The factorial of n is just an instance of P on previous slide:
1 × (1 × ... × n)Use num-times-range to write factorial with one argument:
(define factorial (lambda (n) _____________________))