摘要: sicp每日一题[2.62] Exercise 2.62 Give a (n) implementation of union-set for sets represented as ordered lists. 这道题难度也不大,思路是依次从两个集合中取第一个元素,比较他们的大小,把小的那个和剩下所有元素连接的结果连接起来。由 阅读全文
posted @ 2024-10-30 08:07 再思即可 阅读(1) 评论(0) 推荐(0) 编辑
摘要: sicp每日一题[2.61] Exercise 2.61 Give an implementation of adjoin-set using the ordered representation. By analogy with element-of-set? show how to take advantage of the 阅读全文
posted @ 2024-10-29 08:17 再思即可 阅读(3) 评论(0) 推荐(0) 编辑
摘要: sicp每日一题[2.60] Exercise2.60 We specified that a set would be represented as a list with no duplicates. Now suppose we allow duplicates. For instance, the set {1, 2, 阅读全文
posted @ 2024-10-28 08:40 再思即可 阅读(1) 评论(0) 推荐(0) 编辑
摘要: sicp每日一题[2.59] Exercise 2.59 Implement the union-set operation for the unordered-list representation of sets. 这道题很简单,仿照 intersection-set 稍作修改就可以实现了 (define (union-se 阅读全文
posted @ 2024-10-27 09:09 再思即可 阅读(5) 评论(0) 推荐(0) 编辑
摘要: sicp每日一题[2.58] Exercise 2.58 Suppose we want to modify the differentiation program so that it works with ordinary mathematical notation, in which + and * are infix r 阅读全文
posted @ 2024-10-26 13:16 再思即可 阅读(5) 评论(0) 推荐(0) 编辑
摘要: sicp每日一题[2.57] Exercise 2.57 Extend the differentiation program to handle sums and products of arbitrary numbers of (two or more) terms. Then the last example above 阅读全文
posted @ 2024-10-25 08:30 再思即可 阅读(6) 评论(0) 推荐(0) 编辑
摘要: sicp每日一题[2.56] Exercise 2.56 Show how to extend the basic differentiator to handle more kinds of expressions. For instance, implement the differentiation rule d(x^n) 阅读全文
posted @ 2024-10-24 08:20 再思即可 阅读(4) 评论(0) 推荐(0) 编辑
摘要: sicp每日一题[2.53-2.55] 2.53不用写代码,2.54和2.55属于一道题,所以就放到一起吧 Exercise2.53 What would the interpreter print in response to evaluating each of the following expressions? (list 'a 阅读全文
posted @ 2024-10-23 08:24 再思即可 阅读(2) 评论(0) 推荐(0) 编辑
摘要: sicp每日一题[2.52] Exercise 2.52 Make changes to the square limit of wave shown in Figure 2.9 by working at each of the levels described above. In particular: a. Add som 阅读全文
posted @ 2024-10-22 10:44 再思即可 阅读(5) 评论(0) 推荐(0) 编辑
摘要: sicp每日一题[2.51] Exercise2.51 Define the below operation for painters. below takes two painters as arguments. The resulting painter, given a frame, draws with the firs 阅读全文
posted @ 2024-10-21 08:46 再思即可 阅读(4) 评论(0) 推荐(0) 编辑