views:

23

answers:

0

(define (accumulate combiner null-value term a next b) (cond ((> a b) null-value) (else (combiner (term a) (accumulate combiner null-value term (next a) next b)))))

Using this accumulate procedure i need to build a list from 1 to 10... This is what i have.. I am still fuzzy on how accumulate works

(define (+1 x) (+ 1 x))

(define (list-int a n) (accumulate + 0 0 (1+ a) n))