灯下 登录
计算机科学 / SICP / 4.4.4 Implementing the Query System

Exercise 4.72 · 习题

Exercise 4.72: Why do disjoin and

stream-flatmap interleave the streams rather than simply append them?

Give examples that illustrate why interleaving works better. (Hint: Why did we

use interleave in 3.5.3?)

练习 4.72:为什么 disjoin 和 stream-flatmap 采用交错方式而非简单拼接各流?请举例说明交错方式为何效果更好。(提示:我们为什么在 3.5.3 中使用了 interleave?)