6.001 Recitation 9: Quiz 1 ReviewAnnouncementsCommon procedures you should know and loveλeopardy Rules6.001 Recitation 9:Quiz 1 ReviewRI: Gerald Dalley ([email protected])http://people.csail.mit.edu/dalleyg/6.001/SP2007/ 7 Mar 2007Announcements•Daylight Savings Time change: lose 1 hour Sunday morning.•Cheat sheets–Oops, 2 are allowed, but more than 1 is probably pointless–Handwritten or printed: either is okay•Old Quizzes:–http://web.mit.edu/amdragon/www/6.001-07-sp/quizzes.html•No recitation on FridayCommon procedures you should know and love(define (length lst) (if (null? lst) 0 (+ 1 (length (cdr lst)))))(define (map proc lst) (if (null? lst) '() (cons (proc (car lst)) (map proc (cdr lst)))))(define (filter pred lst) (cond ((null? lst) '()) ((pred (car lst)) (cons (car lst) (filter pred (cdr lst)))) (else (filter pred (cdr lst)))))(define (fold-right op init lst) (if (null? lst) init (op (car lst) (fold-right op init (cdr lst)))))λeopardy Rulesλeopardy Rules•Write your answer on the board•Turn around and raise your hand•Team consultation allowed•Round-robin answering•Scoring–Correct answer: responder gets points–Successful challenge: challenger gets points, responder loses points–Failed challenge: challenger loses points–Wrong answer: responder loses points•Trick questions are fair
View Full Document