chickadee » sicp » scale-stream

scale-stream stream factorprocedure

Scales the stream by a constant factor.

stream
The stream to scale
factor
The factor by which to scale it
(define (scale-stream stream factor)
  (stream-map (lambda (x) (* x factor)) stream))