fix for PR8079

svn: r3161
This commit is contained in:
Eli Barzilay 2006-05-31 21:25:56 +00:00
parent 436c36cc1e
commit cbfb5fc62b

View File

@ -103,23 +103,20 @@
(define (list= = . lists) (define (list= = . lists)
(or (null? lists) ; special case (or (null? lists) ; special case
(let lp1 ((list-a (car lists)) (others (cdr lists)))
(let lp1 ((list-a (car lists)) (others (cdr lists))) (or (null? others)
(or (null? others) (let ((list-b (car others))
(let ((list-b (car others)) (others (cdr others)))
(others (cdr others))) (if (eq? list-a list-b) ; EQ? => LIST=
(if (eq? list-a list-b) ; EQ? => LIST= (lp1 list-b others)
(lp1 list-b others) (let lp2 ((la list-a) (lb list-b))
(let lp2 ((list-a list-a) (list-b list-b)) (if (null-list? la)
(if (null-list? list-a) (and (null-list? lb)
(and (null-list? list-b) (lp1 list-b others))
(lp1 list-b others)) (and (not (null-list? lb))
(and (not (null-list? list-b)) (= (car la) (car lb))
(= (car list-a) (car list-b)) (lp2 (cdr la) (cdr lb)))))))))))
(lp2 (cdr list-a) (cdr list-b)))))))))))
) )