mapValues

trait Map[K, V] {
  def mapValues[W](f: (V) => W): Map[K, W]
}

mapValues creates a Map with the same keys from this Map but transforming each key’s value using the function f.