i1 : set{a,b,c} + set{a,d,f} o1 = set {d, f, a, b, c} 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 {12, 10, 11}, set {20, 21, 22}} o2 : List |
i3 : sum x o3 = set {0, 1, 2, 20, 21, 22, 10, 11, 12} o3 : Set |