Fixed bug in the reference implementation reported by Vladimir Tsichevski on c.l.s..

This commit is contained in:
mainzelm 2002-09-09 08:03:59 +00:00
parent e3d6f985fc
commit cd9907c68f
1 changed files with 2 additions and 2 deletions

View File

@ -1569,7 +1569,7 @@
;; Compute a-b and a^b, then compute b-(a^b) and ;; Compute a-b and a^b, then compute b-(a^b) and
;; cons it onto the front of a-b. ;; cons it onto the front of a-b.
(receive (a-b a-int-b) (lset-diff+intersection = a b) (receive (a-b a-int-b) (lset-diff+intersection = a b)
(cond ((null? a-b) (lset-difference b a =)) (cond ((null? a-b) (lset-difference = b a))
((null? a-int-b) (append b a)) ((null? a-int-b) (append b a))
(else (fold (lambda (xb ans) (else (fold (lambda (xb ans)
(if (member xb a-int-b =) ans (cons xb ans))) (if (member xb a-int-b =) ans (cons xb ans)))
@ -1591,7 +1591,7 @@
;; Compute a-b and a^b, then compute b-(a^b) and ;; Compute a-b and a^b, then compute b-(a^b) and
;; cons it onto the front of a-b. ;; cons it onto the front of a-b.
(receive (a-b a-int-b) (lset-diff+intersection! = a b) (receive (a-b a-int-b) (lset-diff+intersection! = a b)
(cond ((null? a-b) (lset-difference! b a =)) (cond ((null? a-b) (lset-difference! = b a))
((null? a-int-b) (append! b a)) ((null? a-int-b) (append! b a))
(else (pair-fold (lambda (b-pair ans) (else (pair-fold (lambda (b-pair ans)
(if (member (car b-pair) a-int-b =) ans (if (member (car b-pair) a-int-b =) ans