(load "2.33.txt") ; for accumulate (define (horner-eval x coefficient-sequence) (accumulate (lambda (this-coeff higher-terms) (+ (* higher-terms x) this-coeff)) 0 coefficient-sequence)) ; 1 ]=> (horner-eval 3 '(-9 0 1)) ; ; ;Value: 0 ; ; 1 ]=> (horner-eval -3 '(-9 0 1)) ; ; ;Value: 0 ; ; 1 ]=> (horner-eval 8 '(-9 2 1)) ; ; ;Value: 71 ; ; 1 ]=> (horner-eval 2 (list 1 3 0 5 0 1)) ; ; ;Value: 79