摘要:
Exercise2.28 Write a procedure fringe that takes as argument a tree (represented as a list) and returns a list whose elements are all the leaves of th 阅读全文
摘要:
2.24-2.26没什么代码量,所以跟 2.27 一起发吧。 Exercise 2.24 Suppose we evaluate the expression (list 1 (list 2 (list 3 4))). Give the result printed by the interpret 阅读全文
摘要:
Exercise2.22 Louis Reasoner tries to rewrite the first square-list procedure of Exercise 2.21 so that it evolves an iterative process: (define (square 阅读全文
摘要:
Exercise 2.21 The procedure square-list takes a list of numbers as argument and returns a list of the squares of those numbers. (square-list (list 1 2 阅读全文
摘要:
Exercise 2.20 The procedures +, *, and list take arbitrary numbers of arguments. One way to define such procedures is to use define with dotted-tail n 阅读全文
摘要:
Exercise 2.19 Consider the change-counting program of Section 1.2.2. It would be nice to be able to easily change the currency used by the program, so 阅读全文
摘要:
Exercise 2.18 Define a procedure reverse that takes a list as argument and returns a list of the same elements in reverse order: (reverse (list 1 4 9 阅读全文
摘要:
Exercise 2.17 Define a procedure last-pair that returns the list that contains only the last element of a given (nonempty) list: (last-pair (list 23 7 阅读全文
摘要:
Exercise 2.13 Show that under the assumption of small percentage tolerances there is a simple formula for the approximate percentage tolerance of the 阅读全文
摘要:
Exercise 2.12 Defineaconstructor make-center-percent that takes a center and a percentage tolerance and produces the desired interval. You must also d 阅读全文