fix id-set-symmetric-difference, same as 4716a6e
fixed for sets
This commit is contained in:
parent
7620bfcb7c
commit
cc25a27f87
|
@ -322,6 +322,10 @@
|
||||||
(define ABCDE/MUTABLE (mk-mutable-id-set ABCDE-LIST))
|
(define ABCDE/MUTABLE (mk-mutable-id-set ABCDE-LIST))
|
||||||
(define ABCDE/IMMUTABLE (mk-immutable-id-set ABCDE-LIST))
|
(define ABCDE/IMMUTABLE (mk-immutable-id-set ABCDE-LIST))
|
||||||
|
|
||||||
|
(test 0 SET-COUNT
|
||||||
|
(SET-SYMMETRIC-DIFFERENCE ABCDE/IMMUTABLE ABCDE/IMMUTABLE))
|
||||||
|
(test 0 SET-COUNT
|
||||||
|
(SET-SYMMETRIC-DIFFERENCE ABCDE/IMMUTABLE (mk-immutable-id-set ABCDE-LIST)))
|
||||||
(test 5 SET-COUNT (SET-SYMMETRIC-DIFFERENCE ABCDE/IMMUTABLE))
|
(test 5 SET-COUNT (SET-SYMMETRIC-DIFFERENCE ABCDE/IMMUTABLE))
|
||||||
(test #t SET-EMPTY? (SET-SYMMETRIC-DIFFERENCE EMPTY/IMMUTABLE))
|
(test #t SET-EMPTY? (SET-SYMMETRIC-DIFFERENCE EMPTY/IMMUTABLE))
|
||||||
(test 4 SET-COUNT (SET-SYMMETRIC-DIFFERENCE EMPTY/IMMUTABLE ABCD))
|
(test 4 SET-COUNT (SET-SYMMETRIC-DIFFERENCE EMPTY/IMMUTABLE ABCD))
|
||||||
|
|
|
@ -277,7 +277,7 @@
|
||||||
(immutable-id-set
|
(immutable-id-set
|
||||||
(for/fold
|
(for/fold
|
||||||
([table (id-set-get-table largest-immutable)])
|
([table (id-set-get-table largest-immutable)])
|
||||||
([s (in-list (cons set0 ss))] #:unless (eq? s largest-immutable))
|
([s (in-list (remq largest-immutable (cons set0 ss)))])
|
||||||
(for/fold ([table table])
|
(for/fold ([table table])
|
||||||
([id (in-dict-keys (id-set-get-table s))])
|
([id (in-dict-keys (id-set-get-table s))])
|
||||||
(if (id-table-ref table id #f)
|
(if (id-table-ref table id #f)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user