Code Review
Compare your solutions
; (define (product term a next b)
; (if (> a b)
; 1
; (* (term a)
; (product term (next a) next b))))
(define (product term a next b)
(define (iter a result)
(if (= a b)
(* (term a) result)
(iter (next a) (* (term a) result))
)
)
(iter a 1)
)
(define (factorial n)
(product * 1 inc n)
)