<< Previous exercise (3.53) | Index | Next exercise (3.55) >>
(define factorials (cons-stream 1 (mul-streams (add-streams ones integers) factorials)))
To make the stream have the nth element be n+1!, shoudn't the function be:
(define factorials
(cons-stream 1
(mul-streams factorials (stream-cdr integers))))
I believe the above is wrong, because `integers' start at 1 and we want the factorial of `n + 1'. Also, it's missing the `mul-streams'. Here's my solution: