SICP Exercise 3.54

Exercise 3.54

;;Exercise 3.54
(define (mul-streams s1 s2)
  (stream-map * s1 s2))
(define factorials (cons-stream 1 (mul-streams (integers-starting-from 2)
                                               factorials)))
由于n! = (n-1)! * n,所以就有了上述的代码。

你可能感兴趣的:(SICP Exercise 3.54)