1 2 3 4 5 ··· 8 下一页
摘要: sicp每日一题[2.84] Exercise 2.84 Using the raise operation of Exercise 2.83, modify the apply-generic procedure so that it coerces its arguments to have the same type by 阅读全文
posted @ 2024-11-21 08:41 再思即可 阅读(0) 评论(0) 推荐(0) 编辑
摘要: sicp每日一题[2.83] Exercise 2.83 Suppose you are designing a generic arithmetic system for dealing with the tower of types shown in Figure 2.25: integer, rational, real, 阅读全文
posted @ 2024-11-20 08:10 再思即可 阅读(3) 评论(0) 推荐(0) 编辑
摘要: sicp每日一题[2.82] Exercise 2.82 Show how to generalize apply-generic to handle coercion in the general case of multiple arguments. One strategy is to attempt to coerce 阅读全文
posted @ 2024-11-19 08:59 再思即可 阅读(1) 评论(0) 推荐(0) 编辑
摘要: sicp每日一题[2.81] Exercise2.81 Louis Reasoner has noticed that apply-generic may try to coerce the arguments to each other’s type even if they already have the same typ 阅读全文
posted @ 2024-11-18 08:39 再思即可 阅读(3) 评论(0) 推荐(0) 编辑
摘要: sicp每日一题[2.80] Exercise 2.80 Define a generic predicate =zero? that tests if its argument is zero, and install it in the generic arithmetic package. This operation s 阅读全文
posted @ 2024-11-17 08:57 再思即可 阅读(2) 评论(0) 推荐(0) 编辑
摘要: sicp每日一题[2.79] Exercise2.79 Define a generic equality predicate equ? that tests the equality of two numbers, and install it in the generic arithmetic package. This o 阅读全文
posted @ 2024-11-16 13:23 再思即可 阅读(1) 评论(0) 推荐(0) 编辑
摘要: sicp每日一题[2.78] Exercise2.78 The internal procedures in the scheme-number package are essentially nothing more than calls to the primitive procedures +, -, etc. It wa 阅读全文
posted @ 2024-11-15 19:24 再思即可 阅读(1) 评论(0) 推荐(0) 编辑
摘要: sicp每日一题[2.77] Exercise 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 th 阅读全文
posted @ 2024-11-14 19:37 再思即可 阅读(3) 评论(0) 推荐(0) 编辑
摘要: sicp每日一题[2.76] Exercise 2.76 As a large system with generic operations evolves, new types of data objects or new operations may be needed. For each of the three stra 阅读全文
posted @ 2024-11-13 19:30 再思即可 阅读(1) 评论(0) 推荐(0) 编辑
摘要: sicp每日一题[2.75] Exercise2.75 Implement the constructor make-from-mag-ang in message-passing style. This procedure should be an alogous to the make-from-real-imag proc 阅读全文
posted @ 2024-11-12 19:52 再思即可 阅读(0) 评论(0) 推荐(0) 编辑
1 2 3 4 5 ··· 8 下一页