Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 2a9dba2f9e
Fetching contributors…

Cannot retrieve contributors at this time

15 lines (12 sloc) 0.393 kB
;; Example 2.34
(define (accumulate op initial seq)
(if (null? seq)
initial
(op (car seq)
(accumulate op initial (cdr seq)))))
(define (horner-interval x coefficient-sequence)
(accumulate (lambda (this-coeff higher-terms)
(+ this-coeff (* x higher-terms)))
0
coefficient-sequence))
(horner-interval 2 (list 1 3 0 5 0 1))
Jump to Line
Something went wrong with that request. Please try again.