Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
12 lines (9 sloc) 229 Bytes
(define (cube x) (* x x x))
(define (inc x) (+ x 1))
(define (sum term a next b)
(define (iter a result)
(if (> a b)
result
(iter (next a) (+ (term a) result))))
(iter a 0))
(= 3025 (sum cube 0 inc 10))