Computer Science 61A - Spring 1999 - Harvey - Midterm 1

Computer Science 61A - Spring 1999 - Harvey - Midterm 1 -...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS61A, Midterm #1, Spring 1999 CS61a, Spring 1999 Midterm #1 (Total: 20 points) Question #1 [3 points] What will Scheme print in response to the following expressions? If an expression produces an error message or runs forever without producing a result, you may just say "error"; you don't have to provide the exact text of the message. If the value of an expression is a procedure, just say "procedure"; you don't have to show the form in which Scheme prints procedures. Assume that no global variables have been defined before entering these expressions (other than the predefined Scheme primitives). (word 'for '(no one)) (if (first 'flying) 'yes 'no) (every (lambda (w) (last (butlast w))) '(think for yourself)) (let ((first last) (last first)) (first (last '(tomorrow never knows)))) ((lambda (a b c) (word b a c)) '(i want you)) ((lambda (a) (a 3)) (lambda (x) (word x x))) file:///C|/Documents%20and%20Settings/Jason%20Raft. ..20Spring%201999%20-%20Harvey%20-%20Midterm%201.htm (1 of 5)1/27/2007 6:29:49 PM
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS61A, Midterm #1, Spring 1999 Question #2 [4 points] Write a procedure n-to-nth that takes a positive integer
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

Computer Science 61A - Spring 1999 - Harvey - Midterm 1 -...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online