(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?
猜你喜欢
转载自blog.csdn.net/bysoulwarden/article/details/72972331
今日推荐
周排行