from test/more import *;
let arr := [ 1, 2, 3 ];
let bag := <<< 1, 2, 2, 3 >>>;
let set := << 1, 2, 3 >>;
let dict := { "1": true, "2": true, "3": true };
is( 2 in arr, 1, "in on Array" );
is( 2 in bag, 1, "in on Bag" );
is( 2 in set, 1, "in on Set" );
is( "2" in dict, 1, "in on Dict keys" );
is( 4 ∈ arr, 0, "∈ on Array" );
is( 4 ∈ bag, 0, "∈ on Bag" );
is( 4 ∈ set, 0, "∈ on Set" );
is( "4" ∈ dict, 0, "∈ on Dict keys" );
is( 4 ∉ arr, 1, "∉ on Array" );
is( 4 ∉ bag, 1, "∉ on Bag" );
is( 4 ∉ set, 1, "∉ on Set" );
is( "4" ∉ dict, 1, "∉ on Dict keys" );
is(( [ 1, 2 ] union[ 2, 3 ] ).length(), 3, "union on Arrays" );
is(( <<< 1, 2 >>> union <<< 2, 3 >>> ).length(), 3, "union on Bags" );
is(( << 1, 2 >> union << 2, 3 >> ).length(), 3, "union on Sets" );
is(( { "1": true, "2": true } union { "2": true, "3": true } ).length(), 3, "union on Dicts" );
is(( [ 1, 2 ] ⋃ [ 2, 3 ] ).length(), 3, "⋃ alias" );
is(( [ 1, 2 ] intersection[ 2, 3 ] ).contains(2), 1, "intersection on Arrays" );
is(( <<< 1, 2 >>> intersection <<< 2, 3 >>> ).contains(2), 1, "intersection on Bags" );
is(( << 1, 2 >> intersection << 2, 3 >> ).contains(2), 1, "intersection on Sets" );
is(( { "1": true, "2": true } intersection { "2": true, "3": true } ).contains("2"), 1, "intersection on Dicts" );
is(( [ 1, 2 ] ⋂ [ 2, 3 ] ).contains(2), 1, "⋂ alias" );
is(( [ 1, 2, 3 ] \ [2] ).length(), 2, "\\ difference on Arrays" );
is(( <<< 1, 2, 3 >>> \ <<< 2 >>> ).length(), 2, "\\ difference on Bags" );
is(( << 1, 2, 3 >> \ << 2 >> ).length(), 2, "\\ difference on Sets" );
is(( { "1": true, "2": true, "3": true } \ {
	"2": true
}
).length(), 2, "\\ difference on Dicts" );
is(( [ 1, 2, 3 ] ∖ [2] ).length(), 2, "∖ alias" );
is( [ 1, 2 ] subsetof[ 1, 2, 3 ], 1, "subsetof Arrays" );
is( <<< 1, 2 >>> subsetof <<< 1, 2, 3 >>>, 1, "subsetof Bags" );
is( << 1, 2 >> subsetof << 1, 2, 3 >>, 1, "subsetof Sets" );
is( { "1": true, "2": true } subsetof { "1": true, "2": true, "3": true }, 1, "subsetof Dicts" );
is( [ 1, 2, 3 ] supersetof[ 1, 2 ], 1, "supersetof Arrays" );
is( <<< 1, 2, 3 >>> supersetof <<< 1, 2 >>>, 1, "supersetof Bags" );
is( << 1, 2, 3 >> supersetof << 1, 2 >>, 1, "supersetof Sets" );
is( { "1": true, "2": true, "3": true } supersetof { "1": true, "2": true }, 1, "supersetof Dicts" );
is( [ 1, 2 ] equivalentof[ 2, 1 ], 1, "equivalentof Arrays" );
is( <<< 1, 2 >>> equivalentof <<< 2, 1 >>>, 1, "equivalentof Bags" );
is( << 1, 2 >> equivalentof << 2, 1 >>, 1, "equivalentof Sets" );
is( { "1": true, "2": true } equivalentof { "2": true, "1": true }, 1, "equivalentof Dicts" );
is( [ 1, 2 ] ⊂ [ 1, 2, 3 ], 1, "⊂ alias" );
is( [ 1, 2, 3 ] ⊃ [ 1, 2 ], 1, "⊃ alias" );
is( [ 1, 2 ] ⊂⊃ [ 2, 1 ], 1, "⊂⊃ alias" );
done_testing();
