Kotlin HashSet intersect()
Syntax & Examples
Syntax of HashSet.intersect()
The syntax of HashSet.intersect() extension function is:
infix fun <T> Iterable<T>.intersect( other: Iterable<T> ): Set<T>
This intersect() extension function of HashSet returns a set containing all elements that are contained by both this collection and the specified collection.