码迷,mamicode.com
首页 >  
搜索关键字:sicp    ( 322个结果
【SICP练习】146 练习4.2
练习4-2原文Exercise 4.2. Louis Reasoner plans to reorder the cond clauses in eval so that the clause for procedure applications appears before the clause for assignments. He argues that this will make the...
分类:其他好文   时间:2015-03-30 09:35:28    阅读次数:138
【SICP练习】147 练习4.3
练习4-3原文Exercise 4.3. Rewrite eval so that the dispatch is done in data-directed style. Compare this with the datadirected differentiation procedure of exercise 2.73. (You may use the car of a compound...
分类:其他好文   时间:2015-03-30 09:33:38    阅读次数:167
【SICP练习】145 练习4.1
练习4-1原文Exercise 4.1. Notice that we cannot tell whether the metacircular evaluator evaluates operands from left to right or from right to left. Its evaluation order is inherited from the underlying Li...
分类:其他好文   时间:2015-03-29 18:08:21    阅读次数:136
【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 many trials to perform. Instead,...
分类:其他好文   时间:2015-03-29 16:37:17    阅读次数:162
【SICP练习】143 练习3.81
练习3-81原文“random” numbers. Produce a stream formulation of this same generator that operates on an input stream of requests to generate a new random number or to reset the sequence to a specified value...
分类:其他好文   时间:2015-03-29 16:37:04    阅读次数:151
SICP:1.37 递归/迭代求无穷连分式
#lang racket(define (cont-frac N D k) (define (cf t) (if (= t 1) (/ (N t) (D t)) (/ (N t) (+ (D t) (cf (- t 1)))) );if );cf (cf k) )...
分类:其他好文   时间:2015-03-29 15:00:48    阅读次数:121
【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, we can give a definition of inte...
分类:其他好文   时间:2015-03-29 13:45:57    阅读次数:101
【SICP练习】140 练习3.71
练习3-71原文代码(define (Ramanujan s) (define (stream-cadr s) (stream-car (stream-cdr s))) (define (stream-cddr s) (stream-cdr (stream-cdr s))) (let ((scar (stream-car s))...
分类:其他好文   时间:2015-03-29 12:21:38    阅读次数:122
【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 how they can be so written). 代码...
分类:其他好文   时间:2015-03-29 12:17:48    阅读次数:147
【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 example, about how many pairs...
分类:其他好文   时间:2015-03-29 10:55:03    阅读次数:110
322条   上一页 1 ... 12 13 14 15 16 ... 33 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!