内容 3.5 Streams · 280
练习 自检推理
Exercise 3.67: Modify the pairs procedure
so that (pairs integers integers) will produce the stream of all
pairs of integers (
i
,
j
) (without the condition i
≤
j). Hint:
You will need to mix in an additional stream.
练习 3.67:修改 pairs 过程,使 (pairs integers integers) 产生所有整数序对 (i, j)(去掉 i ≤ j 的条件)。提示:你需要混入一个额外的流。
我的笔记 自动保存