mapValues<R> method

KtMap<K, R> mapValues<R>(
  1. R transform(
    1. KtMapEntry<K, V>
    )
)

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.

The returned map preserves the entry iteration order of the original map.

Implementation

KtMap<K, R> mapValues<R>(R Function(KtMapEntry<K, V>) transform) {
  final mapped = mapValuesTo(linkedMapFrom<K, R>(), transform);
  return mapped;
}