Kotlin HashMap mapValues()
Syntax & Examples
Syntax of HashMap.mapValues()
The syntax of HashMap.mapValues() extension function is:
fun <K, V, R> Map<out K, V>.mapValues( transform: (Entry<K, V>) -> R ): Map<K, R>
This mapValues() extension function of HashMap returns a new map with entries having the keys of this map and the values obtained by applying the transform function to each entry in this Map.