若要表达从1计算到n的运算组合式,(*⋯(* (* (* (* 1 1) 2) 3) 4) ⋯n)定义一个过程。正确的定义
若要表达从1计算到n的运算组合式,(*⋯(* (* (* (* 1 1) 2) 3) 4) ⋯n)定义一个过程。正确的定义为 _____。
(A) (define (f product counter max-count)(f (* counter product) (counter 1) max-count ));
(B) (define (f product counter max-count)(cond ((>counter max-count) product)((<= counter max-count) (f (counter*product) (counter+ 1) max-count )) ));
(C) (define (f product counter max-count)(cond ((>counter max-count) product)((<= counter max-count) (f (* counter product) (counter 1) max-count )) ));
(D) (define (f product counter max-count)(cond ((>counter max-count) product)((<= counter max-count) (f product counter max-count )) ));