享受代码,享受人生

SOA is an integration solution. SOA is message oriented first.
The Key character of SOA is loosely coupled. SOA is enriched
by creating composite apps.
随笔 - 213, 文章 - 45, 评论 - 2315, 阅读 - 121万
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

随笔分类 -  SICP

摘要:(define (f n) (if (< n 3) n (f-iter 0 1 2 n))) (define (f-iter a b c count) (if (= count 2) c (f-iter b c (+ c (* 2 b) (* 3 a)) (- count 1))))(f-iter a b ... 阅读全文

posted @ 2006-05-05 18:00 idior 阅读(1666) 评论(2) 推荐(0) 编辑

摘要:SICP 1.9 这部分内容主要描述了递规和迭代的区别,很有意思。虽然形式上它们都是以递规函数的形式出现但是在思想上却大不相同, 递规的效率也比迭代差很多,而通常高级语言中递规函数是无法实现迭代的功能的(scheme为什么能实现以后才介绍) ,而是靠循环来实现迭代。 递规和迭代的重要区别就是,当它们在运行过程中被中止的时候,迭代仅仅依靠函数的参数就可以恢复执行,而递规则需要程序运行中的一些其他状态... 阅读全文

posted @ 2006-05-04 14:33 idior 阅读(1866) 评论(1) 推荐(0) 编辑

摘要:(define (new-if pre thenc elsec) (cond (pre thenc) (else elsec))) (define (squa-it guess x) (new-if (goodenough? guess x) guess (squa-it(improve guess x) x) )) (d... 阅读全文

posted @ 2006-05-01 23:54 idior 阅读(1900) 评论(4) 推荐(0) 编辑

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