Set
Arturo
<lang rebol>a: [1 2 3 4] b: [3 4 5 6]
print in? 3 a print contains? b 3
print union a b print intersection a b print difference a b print difference.symmetric a b
print a = b
print subset? [1 3] a print subset?.proper [1 3] a print subset? [1 3] [1 3] print subset?.proper [1 3] [1 3]
print superset? a [1 3] print superset?.proper a [1 3] print superset? [1 3] [1 3] print superset?.proper [1 3] [1 3]</lang>
- Output:
true true 1 2 3 4 5 6 3 4 1 2 1 2 5 6 false true true true false true true true false