(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))
SICP 2.54 符号列表equal?
最新推荐文章于 2021-03-07 15:04:27 发布