From cbfb5fc62bcaa48191d2359f0c02d0af03c8f3bf Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Wed, 31 May 2006 21:25:56 +0000 Subject: [PATCH] fix for PR8079 svn: r3161 --- collects/srfi/1/predicate.ss | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/collects/srfi/1/predicate.ss b/collects/srfi/1/predicate.ss index 9988454492..fe48813e14 100644 --- a/collects/srfi/1/predicate.ss +++ b/collects/srfi/1/predicate.ss @@ -103,24 +103,21 @@ (define (list= = . lists) - (or (null? lists) ; special case - - (let lp1 ((list-a (car lists)) (others (cdr lists))) - (or (null? others) - (let ((list-b (car others)) - (others (cdr others))) - (if (eq? list-a list-b) ; EQ? => LIST= - (lp1 list-b others) - (let lp2 ((list-a list-a) (list-b list-b)) - (if (null-list? list-a) - (and (null-list? list-b) - (lp1 list-b others)) - (and (not (null-list? list-b)) - (= (car list-a) (car list-b)) - (lp2 (cdr list-a) (cdr list-b))))))))))) - - + (or (null? lists) ; special case + (let lp1 ((list-a (car lists)) (others (cdr lists))) + (or (null? others) + (let ((list-b (car others)) + (others (cdr others))) + (if (eq? list-a list-b) ; EQ? => LIST= + (lp1 list-b others) + (let lp2 ((la list-a) (lb list-b)) + (if (null-list? la) + (and (null-list? lb) + (lp1 list-b others)) + (and (not (null-list? lb)) + (= (car la) (car lb)) + (lp2 (cdr la) (cdr lb))))))))))) ) -;;; predicate.ss ends here \ No newline at end of file +;;; predicate.ss ends here