fixing bug in lset-union (thanks to alexander shendi)

This commit is contained in:
Alex Shinn 2010-04-20 21:12:24 +09:00
parent 5c91226157
commit 4d64568736

View file

@ -23,7 +23,7 @@
(define (lset-union2 eq a b)
(if (null? b)
a
(lset-union2 (cdr b) (if (member (car b) a eq) a (cons (car b) a)))))
(lset-union2 eq (if (member (car b) a eq) a (cons (car b) a)) (cdr b))))
(define (lset-union eq . sets)
(reduce (lambda (a b) (lset-union2 eq a b)) '() sets))