Lab Quiz, Foundations of Computing, Week 6 -- Thurs Nov 2 2000

Name:


For all questions, assume the following definitions have been executed:

(define s '(a b c d))
(define l '((a b) c d))  ;; That's the letter l (small L), not the numeral 1 (one)

Write down the value of each of these expressions:

  1. s

  2. (car s)

  3. (cdr s)

  4. (cons 'a '(b c d))

  5. (cons (car s) (cdr s))

  6. (car (cdr s))

  7. (cadr s)

  8. l ;; That's the letter l (small L), not the numeral 1 (one)

  9. (car l)

  10. (cdr l)

  11. (cons '(a b) '(c d))

  12. (cons (car l) (cdr l))

  13. (list '(a b) '(c d))

  14. (append '(a b) '(c d))