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.
sicp-all-tasks/sicp/3_002e55

47 lines
415 B

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, ….