Code: Select all
(define (similar-struct? obj1 obj2)
(cond
((and (atom? obj1) (atom? obj2))
#t )
((atom? obj1)
#f )
((atom? obj2)
#f)
(else
(and (similar-struct? (car obj1) (car obj2))
(similar-struct? (cdr obj1) (cdr obj2)) ))))