灯下 登录
计算机科学 / SICP / 3.5.3 Exploiting the Stream Paradigm

Exercise 3.67 · 习题

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 的条件)。提示:你需要混入一个额外的流。