 [ { 1 } ] [ { 1 2 3 4 } { 2 3 4 } diff ] unit-test
 [ { 1 } ] [ { 1 1 2 3 } { 2 3 4 4 } diff ] unit-test
 
+[ T{ bit-set { table ?{ f f f } } } ]
+[ 3 <bit-set> 0 over adjoin dup diff ] unit-test
+
 [ f ] [ { 1 2 3 4 } { 1 2 } subset? ] unit-test
 [ t ] [ { 1 2 3 4 } { 1 2 } swap subset? ] unit-test
 [ t ] [ { 1 2 } { 1 2 } subset? ] unit-test

! Copyright (C) 2010 Daniel Ehrenberg
! See http://factorcode.org/license.txt for BSD license.
USING: sets tools.test kernel prettyprint hash-sets sorting ;
IN: sets.tests

[ V{ 1 2 3 } ] [ 3 V{ 1 2 } clone [ adjoin ] keep ] unit-test

[ { 1 1 } ] [ { 1 1 2 3 3 } { 2 3 4 4 } without ] unit-test

[ { 1 2 3 } ] [ { { 1 } { 2 } { 1 3 } } combine ] unit-test
[ f ] [ { } combine ] unit-test

[ { 1 4 9 16 25 36 } ]
[ { { 1 2 3 } { 4 5 6 } } [ [ sq ] map ] gather ] unit-test

[ H{ { 3 HS{ 1 2 } } } ] [ H{ } clone 1 3 pick adjoin-at 2 3 pick adjoin-at ] unit-test

[ H{ { 3 H{ { 1 1 } { 2 2 } } } } ] [ H{ } clone 1 3 pick conjoin-at 2 3 pick conjoin-at ] unit-test

TUPLE: null-set ;
INSTANCE: null-set set
M: null-set members drop f ;

[ 0 ] [ T{ null-set } cardinality ] unit-test
[ f ] [ T{ null-set } members ] unit-test
[ t ] [ T{ null-set } T{ null-set } set-like T{ null-set } = ] unit-test

[ t ] [ T{ null-set } set? ] unit-test
[ t ] [ HS{ } set? ] unit-test
[ t ] [ { } set? ] unit-test
[ t ] [ 5 <bit-set> set? ] unit-test
[ f ] [ H{ } set? ] unit-test
