合集-sicp
摘要:
right-split and up-split can be expressed as instances of a general splitting operation. Define a procedure split with the property that evaluating (d
阅读全文
![sicp每日一题[2.45]](https://img2024.cnblogs.com/blog/3223467/202410/3223467-20241015082100153-151915266.png)
摘要:
Exercise 2.46 A two-dimensional vector v running from the origin to a point can be represented as a pair consisting of an x-coordinate and a y-coordin
阅读全文
![sicp每日一题[2.46]](https://img2024.cnblogs.com/blog/3223467/202410/3223467-20241016083505549-698758024.png)
摘要:
Exercise 2.47 Here are two possible constructors for frames: (define (make-frame origin edge1 edge2) (list origin edge1 edge2)) (define (make-frame or
阅读全文
![sicp每日一题[2.47]](https://img2024.cnblogs.com/blog/3223467/202410/3223467-20241017084033019-514759581.png)
摘要:
Exercise 2.48 A directed line segment in the plane can be represented as a pair of vectors—the vector running from the origin to the start-point of th
阅读全文
![sicp每日一题[2.48]](https://img2024.cnblogs.com/blog/3223467/202410/3223467-20241018085320672-996384321.png)
摘要:
Exercise 2.49 Use segments->painter to define the following primitive painters: a. The painter that draws the outline of the designated frame. b. The
阅读全文
![sicp每日一题[2.49]](https://img2024.cnblogs.com/blog/3223467/202410/3223467-20241019124518297-1770825096.png)
摘要:
Exercise 2.50 Define the transformation flip-horiz, which flips painters horizontally, and transformations that rotate painters counterclockwise by 18
阅读全文
![sicp每日一题[2.50]](https://img2024.cnblogs.com/blog/3223467/202410/3223467-20241020091207950-1064448858.png)
摘要:
Exercise2.51 Define the below operation for painters. below takes two painters as arguments. The resulting painter, given a frame, draws with the firs
阅读全文
![sicp每日一题[2.51]](https://img2024.cnblogs.com/blog/3223467/202410/3223467-20241021084646832-998666087.png)
摘要:
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
阅读全文
![sicp每日一题[2.52]](https://img2024.cnblogs.com/blog/3223467/202410/3223467-20241022104356916-332102104.png)
摘要:
2.53不用写代码,2.54和2.55属于一道题,所以就放到一起吧 Exercise2.53 What would the interpreter print in response to evaluating each of the following expressions? (list 'a
阅读全文
![sicp每日一题[2.53-2.55]](https://img2024.cnblogs.com/blog/3223467/202410/3223467-20241023082445018-1169342153.png)
摘要:
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)
阅读全文
![sicp每日一题[2.56]](https://img2024.cnblogs.com/blog/3223467/202410/3223467-20241024081955246-1426659414.png)
摘要:
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
阅读全文
![sicp每日一题[2.57]](https://img2024.cnblogs.com/blog/3223467/202410/3223467-20241025083052391-920535210.png)
摘要:
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
阅读全文
![sicp每日一题[2.58]](https://img2024.cnblogs.com/blog/3223467/202410/3223467-20241026131646376-1423759363.png)
摘要:
Exercise 2.59 Implement the union-set operation for the unordered-list representation of sets. 这道题很简单,仿照 intersection-set 稍作修改就可以实现了 (define (union-se
阅读全文
![sicp每日一题[2.59]](https://img2024.cnblogs.com/blog/3223467/202410/3223467-20241027090909467-1985705850.png)
摘要:
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,
阅读全文
![sicp每日一题[2.60]](https://img2024.cnblogs.com/blog/3223467/202410/3223467-20241028084031781-230444394.png)
摘要:
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
阅读全文
![sicp每日一题[2.61]](https://img2024.cnblogs.com/blog/3223467/202410/3223467-20241029081648411-1356264336.png)
摘要:
Exercise 2.62 Give a (n) implementation of union-set for sets represented as ordered lists. 这道题难度也不大,思路是依次从两个集合中取第一个元素,比较他们的大小,把小的那个和剩下所有元素连接的结果连接起来。由
阅读全文
![sicp每日一题[2.62]](https://img2024.cnblogs.com/blog/3223467/202410/3223467-20241030080653431-1890749931.png)
摘要:
Exercise 2.63 Each of the following two procedures converts a binary tree to a list. (define (tree->list-1 tree) (if (null? tree) '() (append (tree->l
阅读全文
![sicp每日一题[2.63-2.64]](https://img2024.cnblogs.com/blog/3223467/202410/3223467-20241031084044823-914644384.png)
摘要:
Exercise 2.65 Use the results of Exercise 2.63 and Exercise 2.64 to give (n) implementations of union-set and intersection-set for sets implemented as
阅读全文
![sicp每日一题[2.65]](https://img2024.cnblogs.com/blog/3223467/202411/3223467-20241101084230040-1909568479.png)
摘要:
Exercise 2.66 Implement the lookup procedure for the case where the set of records is structured as a binary tree, ordered by the numerical values of
阅读全文
![sicp每日一题[2.66]](https://img2024.cnblogs.com/blog/3223467/202411/3223467-20241102113059624-1460592812.png)
摘要:
Exercise 2.67 Define an encoding tree and a sample message: (define (make-leaf-set pairs) (if (null? pairs) '() (let ((pair (car pairs))) (adjoin-set
阅读全文
![sicp每日一题[2.67-2.68]](https://img2024.cnblogs.com/blog/3223467/202411/3223467-20241103085853336-952111968.png)