equal.scm 258 B

12345678910111213
  1. (define (equal? x y)
  2. (if (pair? x)
  3. (if (pair? y)
  4. (if (equal? (car x) (car y))
  5. (equal? (cdr x) (cdr y))
  6. #f)
  7. #f)
  8. (if (string? x)
  9. (if (string? y)
  10. (string=? x y)
  11. #f)
  12. (eq? x y))))