sicp-ex-3.52



<< Previous exercise (3.51) | Index | Next exercise (3.53) >>


perry

(define seq (stream-map accum (stream-enumerate-interval 1 20)))

sum

;Value: 1

(define y (stream-filter even? seq))

sum

;Value: 6

(define z (stream-filter (lambda (x) (= (remainder x 5) 0)) seq))

(stream-ref y 7)

;Value: 136