in search of equality:
eq? and equal?


Given these definitions, what will eq? and equal? return when called on the pairs listed below?

  (define s "donut")
  (define t s)
  (define l (list 3 4))
  (define m (cons 3 '(4)))
  (define x (car l))
  (define y 3)

eq? equal?
  1. s and "donut"
  2. t and "donut"
  3. s and t
  4. m and (list 3 4)
  5. l and m
  6. x and y
  7. x and 3















Ken Yasuhara <yasuhara@cs.washington.edu>
Last modified: Thu Jul 1 14:39:14 PDT 1999