Kotlin HashSet filterTo()
Syntax & Examples
Syntax of HashSet.filterTo()
The syntax of HashSet.filterTo() extension function is:
fun <T, C : MutableCollection<in T>> Iterable<T>.filterTo( destination: C, predicate: (T) -> Boolean ): C
This filterTo() extension function of HashSet appends all elements matching the given predicate to the given destination.