sicp

再思即可1 个月前
算法·lisp·函数式编程·sicp·scheme
sicp每日一题[2.77]Louis Reasoner tries to evaluate the expression (magnitude z) where z is the object shown in Figure 2.24. To his surprise, instead of the answer she gets an error message from apply-generic, saying there is no method for the operation magnitude on the typ
再思即可2 个月前
算法·lisp·函数式编程·sicp·scheme
sicp每日一题[2.63-2.64]Each of the following two procedures converts a binary tree to a list.
再思即可3 个月前
编程·lisp·函数式编程·sicp·scheme
sicp每日一题[2.31]Abstract your answer to Exercise 2.30 to produce a procedure t r e e − m a p tree-map tree−map with the property that s q u a r e − t r e e square-tree square−tree could be defined as
再思即可3 个月前
编程·lisp·函数式编程·sicp·scheme
sicp每日一题[2.13-2.16]Show that under the assumption of small percentage tolerances there is a simple formula for the approximate percentage tolerance of the product of two intervals in terms of the tolerances of the factors. You may simplify the problem by assumingthat all nu
再思即可4 个月前
编程·lisp·sicp·scheme
sicp每日一题[2.1]Exercise 2.1: Define a better version of make-rat that handles both positive and negative arguments. make-rat should normalize the sign so that if the rational number is positive, both the numerator and denominator are positive, and if the rational number
再思即可4 个月前
编程·lisp·sicp·scheme
sicp每日一题[1.45]We saw in Section 1.3.3 that attempting to compute square roots by naively finding a fixed point of y->x/y does not converge, and that this can be fixed by average damping. The same method works for finding cube roots as fixed points of the average-damped
zaizai10071 年前
sicp
SICP-- 元语言抽象--Scheme的变形--惰性求值应用序:在过程应用时,提供给Scheme的所有参数都需要完成求值正则序:将把对过程参数的求值延后到需要这些实际参数的值的时候。