内容 3.5 Streams · 267
练习 自检推理
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, ….
练习 3.55:定义一个过程 partial-sums,它以流 S 为参数,返回一个流,其各元素为 S₀,S₀ + S₁,S₀ + S₁ + S₂,……。例如,(partial-sums integers) 应得到流 1, 3, 6, 10, 15, ……。
我的笔记 自动保存