]> git.rkrishnan.org Git - sicp.git/blob - src/sicp/ex3_56.rkt
Solution to 4.44. A bit too verbose. Can be improved by better
[sicp.git] / src / sicp / ex3_56.rkt
1 #lang racket
2
3 (define S (cons-stream 1 (merge (scale-stream S 2)
4                                 (merge (scale-stream S 3)
5                                        (scale-stream S 5)))))
6
7 #|
8
9 > (display-stream S)
10
11 1
12 2
13 3
14 4
15 5
16 6
17 8
18 9
19 10
20 12
21 15
22 16
23 18
24 20
25 24
26 25
27 27
28 30
29 32
30 36
31 40
32 45
33 48
34 50
35 54
36 60
37 64
38 72
39
40 |#