Procedures Functions as Returned Values - SICP Comparison Edition"/>1.3.4   <span style="color:green">Procedures</span> <span style="color:blue">Functions</span> as Returned Values - SICP Comparison Edition SICP — Scheme/JS Structure and Interpretation of Computer Programs — Comparison Edition

[1]
Original Python
Observe that this is a combination whose operator is itself a combination. Exercise 1.4 already demonstrated the ability to form such combinations, but that was only a toy example. Here we begin to see the real need for such combinations—when applying a procedure that is obtained as the value returned by a higher-order procedure. Observe that this is an application whose function expression is itself an application. Exercise 1.4 already demonstrated the ability to form such applications, but that was only a toy example. Here we begin to see the real need for such applications—when applying a function that is obtained as the value returned by a higher-order function.
[2] See exercise 1.45 for a further generalization.
[3] Elementary calculus books usually describe Newton's method in terms of the sequence of approximations $x_{n+1}=x_n-g(x_n)/Dg(x_n)$. Having language for talking about processes and using the idea of fixed points simplifies the description of the method.
[4] Newton's method does not always converge to an answer, but it can be shown that in favorable cases each iteration doubles the number-of-digits accuracy of the approximation to the solution. In such cases, Newton's method will converge much more rapidly than the half-interval method.
[5] For finding square roots, Newton's method converges rapidly to the correct solution from any starting point.
[6] The notion of first-class status of programming-language elements is due to the British computer scientist Christopher Strachey (1916–1975).
[7] We'll see examples of this after we introduce data structures in chapter 2.
[8] The major implementation cost of first-class procedures functions is that allowing procedures functions to be returned as values requires reserving storage for a procedure's free variables function's free names even while the procedure function is not executing. In the Scheme implementation we will study in section , these variables are stored in the procedure's In the Python implementation we will study in section , these names are stored in the function's environment.
1.3.4   Procedures Functions as Returned Values