learning-sicp

My embarrassing half assed SICP run.
git clone https://kaka.farm/~git/learning-sicp
Log | Files | Refs

exercise-34.scm (357B)


      1 (define-library (sicp solutions chapter-2 exercise-34)
      2   (import (scheme base))
      3   (import (sicp utils))
      4   (export horner-eval)
      5 
      6   (begin
      7     (define (horner-eval x coefficient-sequence)
      8       (accumulate
      9        (lambda (this-coeff higher-terms)
     10          (+ (* higher-terms
     11                x)
     12             this-coeff))
     13        0
     14        coefficient-sequence))))