《Structure and Interpretation of Computer Programs》q2 solns post

MASSACHVSETTS INSTITVTE OF TECHNOLOGY Depart ment of Electrical Engineering and Computer Science 01-Structure and Interpret at ion of Computer Programs Spring Semester, 2005 Quiz it NAME: Sample Solutions Part 1:(25 points) Question 1 (define (rotate-left cycle) (cdr cycle)) Question 2: (define (rotate-right cycle) (define (aux where start (if (eq? (cdr where)start) where Caux (cdr where) start))) (aux cycle cycle)) Question 3: (define (insert-cycle! new cycle) et ((new-cell (list new )) (set-cdr! new-cell cycle) (set-cdr! (rotate-right cycle) new-cell) 'done)) Question 4 (define (delete-cycle! cycle) (set-cdr! (rotate-right cycle)(rotate-left cycle) set-cdr! cycle’( done) Part 2: (30 points
!""# $% %& '""( )

6.001, Spring Semester, 2005--Quiz II Enclosing eny ironment E1 E2 E2 GE E3 GE E4 E1 Question 6: Environment Value to which bound etI -start GE Pl set!-careful I GE E2 5 GE E4 (10) act ion new E P4 current E 10 Question 7 location:卫2 value (5) Part 3(15 points) Question 8:A Question 9: K Question 10: H Question 1l: G Question 12: J Part 4 30 points
' % * ' + , - * .// - %01% %01 * ' . , , * + * + ) *) ! " # $

6.001, Spring Semester, 2005--Quiz Il Ques Question 14. SHeETs (lambda o (fold-right +0 map (lambda (thing)(ask thing ' SHEETS)) Question 1 110 Question 17 Question 18. Question 19 (define (aged-cabinet self name) (let ((cabinet-part(cabinet self name Cage 0)) (make-handler ADD-THING (lambda (thing) (if (< age 4) (ask cabinet-part 'ADdThING thing (set! age ( age 1))) 'broken))) cabinet -part))) Question 20: (define (located-cabinet self name x y) (let((cabinet -part (cabinet self name)) (located-object-part (located-object self x y))) (make-handler (make-methods cabinet -part located-ob ject -part)))
+ % % &' % % % % ! !" # $ % & ' ( ( & ' (

(ceefinrcta-nIc ly)loi gehu x wts ga Question 21 Sanpl em Sewo Ser 4)any ( My ann(rn3: n4 c: n3lee CQp Sn40 anc(eesnl jec(s)nR CAe(sx! 3ewoc Question 22 No QuzIsXsY! Sanpl emS3ewx 3ewyo Sn40 4eat CAe(sx! 3ewxo Sn0 4eat CAe(sy! 3ewyoo
, ) ' **+' , ( &$ ) () -.$ )& )' &$ )& '$ )'
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《Structure and Interpretation of Computer Programs》q1 sp05.pdf
- 《Structure and Interpretation of Computer Programs》q2 sp 05.pdf
- 《Structure and Interpretation of Computer Programs》q1 sp05 solns.pdf
- 《Structure and Interpretation of Computer Programs》lecture 26 webhan.pdf
- 《Structure and Interpretation of Computer Programs》lecture 23 webhan.pdf
- 《Structure and Interpretation of Computer Programs》lecture 22 webhan.pdf
- 《Structure and Interpretation of Computer Programs》lecture21 lazyeva.pdf
- 《Structure and Interpretation of Computer Programs》lecture 21 webha2.pdf
- 《Structure and Interpretation of Computer Programs》lecture 21 webhan.pdf
- 《Structure and Interpretation of Computer Programs》lecture 20 evalco.pdf
- 《Structure and Interpretation of Computer Programs》lecture 20 webhan.pdf
- 《Structure and Interpretation of Computer Programs》lecture 19 interco.pdf
- 《Structure and Interpretation of Computer Programs》lecture 19 webha2.pdf
- 《Structure and Interpretation of Computer Programs》lecture 19 webhan.pdf
- 《Structure and Interpretation of Computer Programs》lecture 18 webhan.pdf
- 《Structure and Interpretation of Computer Programs》lecture17 webhan.pdf
- 《Structure and Interpretation of Computer Programs》lecture 16 webhan.pdf
- 《Structure and Interpretation of Computer Programs》lecture 15 webha2.pdf
- 《Structure and Interpretation of Computer Programs》lecture 15 webhan.pdf
- 《Structure and Interpretation of Computer Programs》lecture 13 webhan.pdf
- 《Structure and Interpretation of Computer Programs》collab work.pdf
- 《Structure and Interpretation of Computer Programs》project0.pdf
- 《Structure and Interpretation of Computer Programs》writeup.pdf
- 《Structure and Interpretation of Computer Programs》project1.pdf
- 《Structure and Interpretation of Computer Programs》project2.pdf
- 《Structure and Interpretation of Computer Programs》st05project4.pdf
- 《Structure and Interpretation of Computer Programs》web.pdf
- 《Structure and Interpretation of Computer Programs》project5 The Meta-Circular Evaluator.pdf
- 上海理工大学:《电子商务基础与应用》课程教学资源(PPT课件)第八章 网络促销.ppt
- 《办公自动化课程教学大纲》讲义.doc
- 《C程序设计语言》课程PPT教学课件(讲稿)第一章 程序设计语言和库函数.ppt
- 《C程序设计语言》课程PPT教学课件(讲稿)第十二章 函数.ppt
- 《C程序设计语言》课程PPT教学课件(讲稿)第三十章 结构体数组.ppt
- 《C程序设计语言》课程PPT教学课件(讲稿)第十三章 函数嵌套.ppt
- 《C程序设计语言》课程PPT教学课件(讲稿)第三十一章 指向结构体变量的指针.ppt
- 《C程序设计语言》课程PPT教学课件(讲稿)第十四章 变量的存储.ppt
- 《C程序设计语言》课程PPT教学课件(讲稿)第十五章 编译预处理.ppt
- 《C程序设计语言》课程PPT教学课件(讲稿)第三十二章 动态存储分配和链表.ppt
- 《C程序设计语言》课程PPT教学课件(讲稿)第三十四章 位运算概述.ppt
- 《C程序设计语言》课程PPT教学课件(讲稿)第十八章 一维数组.ppt