09 2024 档案

摘要:sicp每日一题[2.34]Exercise 2.34 Evaluating a polynomial in x at a given value of x can be formulated as an accumulation. We evaluate the polynomial an x^n + a{n-1} x^(n 阅读全文
posted @ 2024-09-30 17:04 再思即可 阅读(5) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.33]Exercise 2.33 Fill in the missing expressions to complete the following definitions of some basic list-manipulation operations as accumulations: ; p 表 阅读全文
posted @ 2024-09-29 08:27 再思即可 阅读(6) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.32]上一道题没什么改动,再来一道 Exercise 2.32 We can represent a set as a list of distinct elements, and we can represent the set of all subsets of the set as a list o 阅读全文
posted @ 2024-09-28 08:40 再思即可 阅读(2) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.31]Exercise 2.31 Abstract your answer to Exercise 2.30 to produce a procedure $tree-map$ with the property that $square-tree$ could be defined as (define 阅读全文
posted @ 2024-09-28 08:37 再思即可 阅读(3) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.30]Exercise 2.30 Define a procedure square-tree analogous to the square-list procedure of Exercise 2.21. That is, square-tree should behave as follows: ( 阅读全文
posted @ 2024-09-27 08:13 再思即可 阅读(5) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.29]Exercise 2.29 A binary mobile consists of two branches, a left branch and a right branch. Each branch is a rod of a certain length, from which hangs e 阅读全文
posted @ 2024-09-26 12:07 再思即可 阅读(8) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.28]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 阅读全文
posted @ 2024-09-25 11:21 再思即可 阅读(3) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.24-2.27]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 阅读全文
posted @ 2024-09-24 10:40 再思即可 阅读(11) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.22-2.23]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 阅读全文
posted @ 2024-09-23 10:59 再思即可 阅读(6) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.21]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 阅读全文
posted @ 2024-09-22 08:34 再思即可 阅读(5) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.20]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 阅读全文
posted @ 2024-09-21 11:40 再思即可 阅读(12) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.19]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 阅读全文
posted @ 2024-09-20 08:03 再思即可 阅读(8) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.18]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 阅读全文
posted @ 2024-09-19 10:26 再思即可 阅读(5) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.17]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 阅读全文
posted @ 2024-09-18 14:02 再思即可 阅读(10) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.13-2.16]Exercise 2.13 Show that under the assumption of small percentage tolerances there is a simple formula for the approximate percentage tolerance of the 阅读全文
posted @ 2024-09-17 13:20 再思即可 阅读(22) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.12]Exercise 2.12 Defineaconstructor make-center-percent that takes a center and a percentage tolerance and produces the desired interval. You must also d 阅读全文
posted @ 2024-09-16 23:20 再思即可 阅读(12) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.10]Exercise 2.10 Ben Bitdiddle, an expert systems programmer, looks over Alyssa’s shoulder and comments that it is not clear what it means to divide by a 阅读全文
posted @ 2024-09-16 23:16 再思即可 阅读(8) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.11]Exercise 2.11 In passing, Ben also cryptically comments: “By testing the signs of the endpoints of the intervals, it is possible to break mul-interval 阅读全文
posted @ 2024-09-15 13:04 再思即可 阅读(7) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.9]Exercise 2.9 The width of an interval is half of the difference between its upper and lower bounds. The width is a measure of the uncertainty of the n 阅读全文
posted @ 2024-09-14 10:54 再思即可 阅读(11) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.8]Exercise 2.8 > Using reasoning analogous to Alyssa's, describe how the difference of two intervals may be computed. Define a corresponding subtraction 阅读全文
posted @ 2024-09-13 13:09 再思即可 阅读(6) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.7]2.7 Alyssa’s program is incomplete because she has not specified the implementation of the interval abstraction. Here is a definition of the interval 阅读全文
posted @ 2024-09-13 13:06 再思即可 阅读(4) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.6]Exercise2.6 In case representing pairs as procedures wasn't mind-boggling enough, consider that, in a language that can manipulate procedures, we can 阅读全文
posted @ 2024-09-12 11:04 再思即可 阅读(7) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.5]Exercise 2.5 Show that we can represent pairs of nonnegative integers using only numbers and arithmetic operations if we represent the pair a and b as 阅读全文
posted @ 2024-09-11 10:37 再思即可 阅读(4) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.4]Exercise 2.4 Here is an alternative procedural representation of pairs. Forthisrepresentation, verify that (car (cons x y)) yields x for any objects x 阅读全文
posted @ 2024-09-10 10:42 再思即可 阅读(7) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.3]Exercise 2.3 Implement a representation for rectangles in a plane. (Hint: You may want to make use of Exercise 2.2.) In terms of your constructors and 阅读全文
posted @ 2024-09-09 12:20 再思即可 阅读(17) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.2]Exercise 2.2 Consider the problem of representing line segments in a plane. Each segment is represented as a pair of points: a starting point and an e 阅读全文
posted @ 2024-09-08 09:01 再思即可 阅读(4) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[2.1]Exercise 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 s 阅读全文
posted @ 2024-09-07 13:43 再思即可 阅读(13) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[1.46]Exercise 1.46 Several of the numerical methods described in this chapter are instances of an extremely general computational strategy known as iterati 阅读全文
posted @ 2024-09-06 11:50 再思即可 阅读(13) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[1.45]Exercise 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 t 阅读全文
posted @ 2024-09-05 14:03 再思即可 阅读(21) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[1.44]Exercise 1.44 The idea of smoothing a function is an important concept in signal processing. If f is a function and dx is some small number, then the 阅读全文
posted @ 2024-09-04 10:49 再思即可 阅读(6) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[1.43]Exercise 1.43 If f is a numerical function and n is a positive integer, then we can form the nth repeated application of f, which is defined to be the 阅读全文
posted @ 2024-09-03 10:55 再思即可 阅读(6) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[1.42]Exercise 1.42 Let f and g be two one-argument functions. The composition f after g is defined to be the function x->f(g(x)). Define a procedure compos 阅读全文
posted @ 2024-09-03 10:27 再思即可 阅读(7) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[1.41]Exercise 1.41 Define a procedure double that takes a procedure of one argument as argument and returns a procedure that applies the original procedure 阅读全文
posted @ 2024-09-02 10:22 再思即可 阅读(4) 评论(0) 推荐(0) 编辑
摘要:sicp每日一题[1.40]Exercise 1.40 Define a procedure cubic that can be used together with the newtons-method procedure in expressions of the form (newtons-method (cubic a 阅读全文
posted @ 2024-09-01 16:18 再思即可 阅读(2) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示