computing factorial (2)
another recursive procedure that implements factorial
(define (factorial k) (fact k 1))
(define (fact k f) (if (= k 1) f (fact (- k 1) (* k f))))
Previous slide
Next slide
Back to first slide
View graphic version