【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 integral that is more like integers-starting-from (also in section 3.5.2):

(define (integral integrand initial-value dt)
   (cons-stream initial-value
                (if (stream-null? integrand)
                    the-empty-stream
                    (integral (stream-cdr integrand)
                              (+ (* dt (stream-car integrand))
                                 initial-value)
                              dt))))

When used in systems with loops, this procedure has the same problem as does our original version of integral. Modify the procedure so that it expects the integrand as a delayed argument and hence can be used in the solve procedure shown above.

代码

 (define (integral delayed-integrand initial-value dt)
         (cons-stream initial-value
                 (let ((integrand (force delayed-integrand)))
                         (if (stream-null? integrand)
                                 the-empty-stream
                                 (integral (delay (stream-cdr integrand))
                                           (+ (* dt (stream-car integrand))
                                                      initial-value)
                                                dt))))) 
时间: 2024-12-13 18:04:20

【SICP练习】142 练习3.77的相关文章

XXX全球 IP 地址库

XXX全球 IP 地址库 Bulgaria 93.123.23.1 93.123.23.2 93.123.23.3 93.123.23.4 93.123.23.5 93.123.23.6 93.123.23.7 93.123.23.8 93.123.23.9 93.123.23.10 93.123.23.11 93.123.23.12 93.123.23.13 93.123.23.14 93.123.23.15 93.123.23.16 93.123.23.17 93.123.23.18 93.

google(转帖)

本帖最后由 qiushui_007 于 2014-6-10 16:14 编辑IP Addresses of Google Global Cachewww.kookle.co.nrBulgaria        93.123.23.1        93.123.23.2        93.123.23.3        93.123.23.4        93.123.23.5        93.123.23.6        93.123.23.7        93.123.23.8 

Google全球IP地址库

Google 全球 IP 地址库 Bulgaria 93.123.23.1 93.123.23.2 93.123.23.3 93.123.23.4 93.123.23.5 93.123.23.6 93.123.23.7 93.123.23.8 93.123.23.9 93.123.23.10 93.123.23.11 93.123.23.12 93.123.23.13 93.123.23.14 93.123.23.15 93.123.23.16 93.123.23.17 93.123.23.18

[转]Google 全球 IP 地址库

IP 地址来源:http://www.kookle.co.nr Bulgaria 93.123.23.1 93.123.23.2 93.123.23.3 93.123.23.4 93.123.23.5 93.123.23.6 93.123.23.7 93.123.23.8 93.123.23.9 93.123.23.10 93.123.23.11 93.123.23.12 93.123.23.13 93.123.23.14 93.123.23.15 93.123.23.16 93.123.23.

Google 全球 IP 地址库

Google 全球 IP 地址库 IP 地址来源:http://www.kookle.co.nr,共计4351个. Bulgaria 93.123.23.1 93.123.23.2 93.123.23.3 93.123.23.4 93.123.23.5 93.123.23.6 93.123.23.7 93.123.23.8 93.123.23.9 93.123.23.10 93.123.23.11 93.123.23.12 93.123.23.13 93.123.23.14 93.123.23.

[分享]Google 全球 IP 地址库[Google Global Cache IPs]

Google 全球 IP 地址库 IP 地址来源:http://www.kookle.co.nr,共计4351个. Bulgaria 93.123.23.1 93.123.23.2 93.123.23.3 93.123.23.4 93.123.23.5 93.123.23.6 93.123.23.7 93.123.23.8 93.123.23.9 93.123.23.10 93.123.23.11 93.123.23.12 93.123.23.13 93.123.23.14 93.123.23.

google全球地址

IP Addresses of Google Global Cache www.kookle.co.nr Bulgaria 93.123.23.1 93.123.23.2 93.123.23.3 93.123.23.4 93.123.23.5 93.123.23.6 93.123.23.7 93.123.23.8 93.123.23.9 93.123.23.10 93.123.23.11 93.123.23.12 93.123.23.13 93.123.23.14 93.123.23.15 93

变化hosts 解决Google打开速度慢的问题 Google 全球IP地址 代理站点

Google 代替网 http://sinaapp.co http://alicdn.co http://baidustatic.co http://www.aol.com/ https://startpage.com/ 一个收费的 FQ站点 9元/月 https://ybb117.com/ 怎样不让google.com跳转到google.com.hk? 来自知乎 自从google的server搬离中国大陆后,大陆地区用户用google服务时会自己主动跳转到香港的http://google.co

SICP 习题 (1.46)解题总结

SICP 习题 1.46 要求我们写一个过程iterative-improve,它以两个过程为参数,其中一个参数用来检测猜测是否足够好,另一个参数用来改进猜测.过程iterative-improve应该返回另一个过程,所返回的过程接收一个参数作为初始猜测,然后不断改进猜测直到结果足够好.题目还要求我们使用iterative-improve重写1.1.7的sqrt过程和1.3.3节的fixed-point过程. 因为涉及到高阶函数,所以整个题目理解起来有一点点费劲.不过这道题作为第一章的收官题确实