1 (define (factorial n) 2 (if (= n 1) 3 1 4 (* n (factorial (- n 1))))) 5 6 (define (factorial n) 7 (fact-iter 1 1 n)) 8 (define (fact-iter product counter max-count) 9 (if (> counter max-count) 10 product 11 (fact-iter (* product counter) (+ counter 1) max-count)))