union
union(s1,s2...) ∪(s1,s2...)
Construct the union of two or more sets. Maintains order with arrays.
Examples
julia> set1 = Set(3, 4, 5, 6)
set2 = Set(1, 3, 4)
union(set1,set2)
Set{Int64}({4,3,5,6,1})
julia> a = Set("Hello")
Set{Char}({'e','H','l','o'})
julia> b = Set([10:-1:6])
Set{Int64}({7,9,10,8,6})
julia> union(a,b)
Set{Integer}({7,9,10,'e','H','l',8,'o',6})
See Also
complement, complement!, intersect, intersect!, issubset, selectperm, selectperm!, Set, setdiff, setdiff!, symdiff, union, union!,User Contributed Notes
Add a Note
The format of note supported is markdown, use triple backtick to start and end a code block.