Kotlin HashSet flatMapTo()
Syntax & Examples
Syntax of HashSet.flatMapTo()
The syntax of HashSet.flatMapTo() extension function is:
fun <T, R, C : MutableCollection<in R>> Iterable<T>.flatMapTo( destination: C, transform: (T) -> Iterable<R> ): C
This flatMapTo() extension function of HashSet appends all elements yielded from results of transform function being invoked on each element of original collection, to the given destination.