2010年3月15日

sicp习题 -- 4.2.2

摘要: Exercise 4.27.Suppose we type in the following definitions to the lazy evaluator:(definecount0)(define(idx)(set!count(+count1))x)Give the missing values in the following sequence of interactions, and ... 阅读全文

posted @ 2010-03-15 22:55 wushukai 阅读(150) 评论(0) 推荐(0)

2010年2月25日

sicp习题---4.2.1 Lazy Evaluation

摘要: Exercise 4.25.Suppose that (in ordinary applicative-order Scheme) we defineunlessas shown above and then definefactorialin terms ofunlessas(define(factorialn)(unless(=n1)(*n(factorial(-n1)))1))What ha... 阅读全文

posted @ 2010-02-25 13:34 wushukai 阅读(247) 评论(0) 推荐(0)

导航