Kotlin HashSet union()
Syntax & Examples
Syntax of HashSet.union()
The syntax of HashSet.union() extension function is:
infix fun <T> Iterable<T>.union(other: Iterable<T>): Set<T>
This union() extension function of HashSet returns a set containing all distinct elements from both collections.