CS212
Exams
Spring 1997 - Prelim 1
Evaluation of Scheme Expressions
For each of the following expressions determine what value would be returned
by a Scheme interpreter, or describe what would happen if the expression is one that does
not yield a value.
(let ((x 10)(f +))
(let* ((x (f x x))(y (f x x)))
(f y y)))
(let ((y 20))
(let* ((x y)
(f (lambda (x) (+ x y))))
(f x)))
(head (tail (head (tail '(1 (2 (4)) 5)))))
((lambda (f) (f f)) (lambda (g) (g g)))
(+ ((lambda (x) x) 5) 4)
Solution
Return to CS 212 Prelim 1 - Spring 1997