加载中
【SICP练习】125 练习3.56

练习3-56 原文 Exercise 3.56. A famous problem, first raised by R. Hamming, is to enumerate, in ascending order with no repetitions, all positive integers with no prime factors ...

【SICP练习】133 练习3.64

练习3-64 原文 Exercise 3.64. Write a procedure stream-limit that takes as arguments a stream and a number (the tolerance). It should examine the stream until it finds two succe...

【SICP练习】124 练习3.55

练习3-55 原文 Exercise 3.55. Define a procedure partial-sums that takes as argument a stream S and returns the stream whose elements are S0, S0 + S1, S0 + S1 + S2, …. For examp...

【SICP练习】143 练习3.81

练习3-81 原文 Exercise 3.81. Exercise 3.6 discussed generalizing the random-number generator to allow one to reset the random-number sequence so as to produce repeatable sequen...

【SICP练习】132 练习3.63

练习3-63 原文 Exercise 3.63. Louis Reasoner asks why the sqrt-stream procedure was not written in the following more straightforward way, without the local variable guesses: (d...

【SICP练习】121 练习3.52

练习3-52 原文 Exercise 3.52. Consider the sequence of expressions (define sum 0) (define (accum x) (set! sum (+ x sum)) sum) (define seq (stream-map accum (stream-enumerate...

【SICP练习】144 练习3.82

练习3-82 原文 Exercise 3.82. Redo exercise 3.5 on Monte Carlo integration in terms of streams. The stream version of estimate-integral will not have an argument telling how man...

【SICP练习】136 练习3.67

练习3-67 原文 Exercise 3.67. Modify the pairs procedure so that (pairs integers integers) will produce the stream of all pairs of integers (i,j) (without the condition i < j). ...

【SICP练习】123 练习3.54

练习3-54 原文 Exercise 3.54. Define a procedure mul-streams, analogous to add-streams, that produces the elementwise product of its two input streams. Use this together with th...

【SICP练习】135 练习3.66

练习3-66 原文 Exercise 3.66. Examine the stream (pairs integers integers). Can you make any general comments about the order in which the pairs are placed into the stream? For ...

【SICP练习】122 练习3.53

练习3-53 原文 Exercise 3.53. Without running the program, describe the elements of the stream defined by (define s (cons-stream 1 (add-streams s s))) 分析 s是一串2的幂。也就是1...

【SICP练习】119 练习3.50

练习3-50 原文 Exercise 3.50. Complete the following definition, which generalizes stream-map to allow procedures that take multiple arguments, analogous to map in section 2.2.3...

【SICP练习】141 练习3.72

练习3-72 原文 Exercise 3.72. In a similar way to exercise 3.71 generate a stream of all numbers that can be written as the sum of two squares in three different ways (showing h...

【SICP练习】127 练习3.58

练习3-58 原文 Exercise 3.58. Give an interpretation of the stream computed by the following procedure: (define (expand num den radix) (cons-stream (quotient (* num radix) den) ...

【SICP练习】142 练习3.77

练习3-77 原文 Exercise 3.77. The integral procedure used above was analogous to the “implicit” definition of the infinite stream of integers in section 3.5.2. Alternatively, w...

【SICP练习】137 练习3.68

练习3-68 原文 Exercise 3.68. Louis Reasoner thinks that building a stream of pairs from three parts is unnecessarily complicated. Instead of separating the pair (S0,T0) from th...

没有更多内容

加载失败,请刷新页面

没有更多内容

返回顶部
顶部