灯下 登录
计算机科学 / SICP / 5.4.4 Running the Evaluator

Exercise 5.28 · 习题

Exercise 5.28: Modify the definition of the

evaluator by changing eval-sequence as described in 5.4.2

so that the evaluator is no longer tail-recursive. Rerun your experiments from

Exercise 5.26 and Exercise 5.27 to demonstrate that both versions

of the factorial procedure now require space that grows linearly with

their input.

练习 5.28:按照 5.4.2 节的描述修改求值器的 eval-sequence 定义,使求值器不再具备尾递归性质。重新进行练习 5.26 和练习 5.27 的实验,以证明两个版本的阶乘过程现在所需的空间都随输入线性增长。