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