mapKeys
inline fun <K, V, L> Map<out K, V>.mapKeys(transform: (Map.Entry<K, V>) -> L, resolve: (key: L, currentValue: V, newValue: V) -> V): Map<L, V>
Returns a new map with entries having the keys obtained by applying the transform function to each entry in this map and the values of this map and resolving conflicts with resolve function.
All pairs are added and resolved in order of iteration.
Return
the result map.
Parameters
transform
function which transforms each key-value pair to a new key.
resolve
lambda function that resolves merge conflicts which receives some key, its current, and new corresponding values.