klyn.collections.HashSet.union
method
public union(other as HashSet<T>) as HashSet<T>:
Description

Returns a new set containing all elements from this set and other.

Parameters
ParameterDescription
otherElements to merge with this set.
Returns

A new hash set containing the union.

Example
import klyn.collections

left = {1, 2, 3}
right = {3, 4}
merged = left.union(right)
assert merged.size == 4
assert 4 in merged