x + y
i1 : set{a,b,c} + set{a,d,f} o1 = set {a, b, c, d, f} o1 : Set
The function sum can be used to form the union of a list of sets, but this can be slow for long lists.
i2 : x = apply(3, i -> set apply(3, j -> 10*i+j)) o2 = {set {0, 1, 2}, set {10, 11, 12}, set {20, 21, 22}} o2 : List
i3 : sum x o3 = set {0, 1, 2, 10, 11, 12, 20, 21, 22} o3 : Set