]> git.rkrishnan.org Git - sicp.git/blob - src/sicp/ex3_50.rkt
Solution to 4.44. A bit too verbose. Can be improved by better
[sicp.git] / src / sicp / ex3_50.rkt
1 #lang racket
2
3 (define (stream-map proc . argstreams)
4   (if (stream-null? (car argstreams))
5       the-empty-stream
6       (cons-stream
7        (apply proc (map stream-car argstreams))
8        (apply stream-map
9               (cons proc (map stream-cdr argstreams))))))