SICP 2.54 符号列表equal?

(define (equal? x y)
  (cond((and (pair? x) (pair? y))
        (and(equal? (car x) (car y))(equal? (cdr x)(cdr y))))
       ((and (not (pair? x)) (not (pair? y)))
        (eq? x y))
       (else false)))
(equal? '(a b c d) '(a b c d))

猜你喜欢

转载自blog.csdn.net/bysoulwarden/article/details/72972331