<< Previous exercise (3.60)
| Index |
Next exercise (3.62) >>
(define (reciprocal-series s)
(cons-stream 1 (scale-stream (mul-series (stream-cdr s) (reciprocal-series s)) -1)))
I'm not sure the above solution works, because calling (reciprocal-series s) on the body creates a new stream, which results are not memoized.
Here's my version:
(define (invert-unit-series series)
(cons-stream 1 (scale-stream (mul-streams (stream-cdr series)
Why is it mul-streams, not mul-series?
The point that leafac makes is exactly the topic of exercise 3.63; the very next exercise.