You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
415 B
47 lines
415 B
2 years ago
|
|
||
|
Exercise 3.55: Define a procedure
|
||
|
partial-sums that takes as argument a stream
|
||
|
S
|
||
|
and returns the
|
||
|
stream whose elements are
|
||
|
|
||
|
S
|
||
|
0
|
||
|
|
||
|
,
|
||
|
|
||
|
|
||
|
S
|
||
|
0
|
||
|
|
||
|
+
|
||
|
|
||
|
S
|
||
|
1
|
||
|
|
||
|
|
||
|
,
|
||
|
|
||
|
|
||
|
S
|
||
|
0
|
||
|
|
||
|
+
|
||
|
|
||
|
S
|
||
|
1
|
||
|
|
||
|
|
||
|
+
|
||
|
|
||
|
|
||
|
S
|
||
|
2
|
||
|
|
||
|
,
|
||
|
…
|
||
|
|
||
|
.
|
||
|
For example, (partial-sums integers) should be the
|
||
|
stream 1, 3, 6, 10, 15, ….
|