Kotlin HashSet mapIndexed()
Syntax & Examples
Syntax of HashSet.mapIndexed()
The syntax of HashSet.mapIndexed() extension function is:
fun <T, R> Iterable<T>.mapIndexed( transform: (index: Int, T) -> R ): List<R>
This mapIndexed() extension function of HashSet returns a list containing the results of applying the given transform function to each element and its index in the original collection.