评估组合以递归处理 (+ 1 2)

Evaluate combination to tackle recursively (+ 1 2)

我正在看SICP的第一章

1.1.3 Evaluating Combinations

它指出

To evaluate a combination, do the following: 

1.  Evaluate the subexpressions of the combination.

2.  Apply the procedure that is the value of the leftmost subexpression (the operator) to the arguments that are the values of the other subexpressions (the operands). 

假设一个组合(+ 1 2)

根据以上算法,
首先是评估(检索)+ 1 和 2)
第二种是对1应用+(存储中间状态)
第三个是再次评估(检索)中间状态和2。
四是将中间状态应用到2.

对吗?
+1的中间状态是什么?

表达式(+ 1 2)是由原始表达式组成的组合:+12

第一步是计算所有子表达式。在这种情况下,它们分别是执行数字求和的运算符,以及分别对应于数字 1 和 2 的数字。

所以你有一个运算符和两个数值。第二步说你必须将运算符(最左边的值)应用于两个数字:换句话说,你必须将求和运算符应用于 1 和 2,以便获得数字 3。过程终止。

请注意,此计算中没有中间状态。

The second is to apply + to 1

不是,第二步是调用函数+,参数值为1和2。

然后计算 1 和 2 的总和以及 returns 3。