over e1.3.1 know recursive and iterative mean

gyumni | Aug. 29, 2019, 8:36 a.m.

This e132ccombiner sum product ,combiner use for the accumulate with term

and if you want to combiner sum and product ,what the first common

is08/30/2019/12:15:53 PM the term ab next and the same struct null-value(base return),,when I click the fuull-concent ,I see the three ,if repeat,and the way ,sum come from is has the thing with + cude and sum-pi and ,now the diff


null-value and the way of term combiner

so how to ,it put term on the side of right ,put + on the side of f(next)combinber is a of if I put + it't give me sum,if I put * it give me prodduct,another arg maybe is null-value :node in product v could be b

A (define (sum term a next b)

    (if (> a b)


        (+ (term a)

           (sum term (next a) next b))))

B(define (product a term product-default count-default v next)

   (if (= count-default 1)


      (product a term (* product-default (term (next v))) (- count-default 1) (next v) next)))

 (define (sum term a next b)

    (if (> a b)


        (+ (term a)

           (sum term (next a) next b))))

has the a (stress complier not complete,maybe I could spuare once it's square( 2*(next a)) /2)(why it's pi/four) next term

(define (pi-sum a b)
  (if (> a b)
      (+ (/ 1.0 (* a (+ a 2))) (pi-sum (+ a 4) b))))

what the b use for it's the end number of a ,the same with f


term equal f? 

so f could be a function and that mean term must be a function,and would the function of the use of sum...,but we should know it's combiner of accumulate is + or *?

About Us


current term is to be combined with the accumulation of the preceding terms combiner terma or term accumulation
accumulate sum product  

the term in the recursive


so term a with count-a

the term in the iterative






so term a with the product

"d is diffient of recursive with iterative "

(define (combiner term d) 

  when is  sum

      when is recursive term a + term(next a)  (null-value (a<b)(0))

     when is iterative  result = term a result +term (next a) (null-value (a<b)(0)) 

  when is product

     when is r term a *term(inc a) (null-value (counter = count)

    when is i result = term a result *term (next a) (null-value (count = 0)(1)) 

it * or + of the combiner a accumulate arg1

it result* or result+ that's is iterative,

this f

arg2 = sum/product and iterative or recursive


term is next take a output a+2 if next is n+2

if combiner is + 

(combiner (term a) (term (next a))

2:28:26 PM


Know more about EOPL! Know more about SICP!