Kotlin HashSet mapTo()
Syntax & Examples
Syntax of HashSet.mapTo()
The syntax of HashSet.mapTo() extension function is:
fun <T, R, C : MutableCollection<in R>> Iterable<T>.mapTo( destination: C, transform: (T) -> R ): C
This mapTo() extension function of HashSet applies the given transform function to each element of the original collection and appends the results to the given destination.