mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-14 08:27:34 +02:00
fixing bug in lset-union (thanks to alexander shendi)
This commit is contained in:
parent
5c91226157
commit
4d64568736
1 changed files with 1 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue