Scheme Quickies!
Monday, June 30
My apologies for leading you astray on some of these quickies. Some of them that I said will not error, will actually error in STk. I was still thinking Dr. Scheme when I made these problems. So try them out again and look at the solutions.


(define (fraggle f) 'rock)
(define four 4)
(define (five) 5)

What is the variable 'fraggle' bound to?
What is the variable four bound to?
What is the variable five bound to?

What will Scheme evaluate these expressions to?

(+ '6 1 '7)
('+ '6 '1 '7)
(/ 3)
(first 3/6)
(first '3/6)
(bf 3/6)
(bf 00012)
(bf '00012)
(bf '10012)
(se '(fraggle fraggle) #t)
(bf (se '(fraggle fraggle) (fraggle fraggle)))
(se (fraggle fraggle) (fraggle fraggle))
(se '((fraggle fraggle) (fraggle fraggle)))
five
'five
(five)
'(five)
''(five)
'('five)
(four)
(= 1 '1)
(= five 5)
(= four 4)
(if (2) 'yes 'no)
(if 0 'yes (/ 1 0))
(let ((a 3)) a)
(let ((four 5)) (+ four (five)))
(member? 'b (or 'red 'blue))
(>= 4 3 2 2 1)