练习4-6原文Exercise 4.6. Let expressions are derived expressions, because
(let (( ) … ( )) )
is equivalent to
((lambda ( … ) ) )
Implement a syntactic transformation let->combination that reduces...
分类:
其他好文 时间:
2015-04-01 09:35:32
阅读次数:
153
练习4-7原文Exercise 4.7. Let* is similar to let, except that the bindings of the let variables are performed sequentially from left to right, and each binding is made in an environment in which all of the...
分类:
其他好文 时间:
2015-04-01 09:31:37
阅读次数:
178
练习4-5原文Exercise 4.5. Scheme allows an additional syntax for cond clauses, ( => ). If evaluates to a true value, then is evaluated. Its value must be a procedure of one argument; this procedure is th...
分类:
其他好文 时间:
2015-03-31 22:34:57
阅读次数:
241
练习4-4原文Exercise 4.4. Recall the definitions of the special forms and and or from chapter 1: ● and: The expressions are evaluated from left to right. If any expression evaluates to false, false is...
分类:
其他好文 时间:
2015-03-31 14:45:56
阅读次数:
156
练习4-2原文Exercise 4.2. Louis Reasoner plans to reorder the cond clauses in eval so that the clause for procedure applications appears before the clause for assignments. He argues that this will make the...
分类:
其他好文 时间:
2015-03-30 09:35:28
阅读次数:
138
练习4-3原文Exercise 4.3. Rewrite eval so that the dispatch is done in data-directed style. Compare this with the datadirected differentiation procedure of exercise 2.73. (You may use the car of a compound...
分类:
其他好文 时间:
2015-03-30 09:33:38
阅读次数:
167
练习4-1原文Exercise 4.1. Notice that we cannot tell whether the metacircular evaluator evaluates operands from left to right or from right to left. Its evaluation order is inherited from the underlying Li...
分类:
其他好文 时间:
2015-03-29 18:08:21
阅读次数:
136
练习3-82原文Exercise 3.82. Redo exercise 3.5 on Monte Carlo integration in terms of streams. The stream version of estimate-integral will not have an argument telling how many trials to perform. Instead,...
分类:
其他好文 时间:
2015-03-29 16:37:17
阅读次数:
162
练习3-77原文Exercise 3.77. The integral procedure used above was analogous to the “implicit” definition of the infinite stream of integers in section 3.5.2. Alternatively, we can give a definition of inte...
分类:
其他好文 时间:
2015-03-29 13:45:57
阅读次数:
101
1 //20150324 练习1 2 import java.util.*; 3 public class exercise { 4 static int a,b; 5 static char[]ch={'+','-','*','/'}; 6 static S...
分类:
其他好文 时间:
2015-03-29 13:28:51
阅读次数:
135