問題解答
問2.34
(define (horner-eval x coefficient-sequence)
(accumulate (lambda (this-coeff higher-terms) (+ this-coeff (* higher-terms x)))
0
coefficient-sequence))
問2.35
(define (count-leaves t)
(accumulate + 0 (map (lambda (x) (cond ((null? x) 0)
((not (pair? x)) 1)
(else (count-leaves x)))) t)))
週末+1日で三日間開くと波に乗るのに時間がかかってしまう。やっぱり週末も手をつけるようにしたほうがいいかも。