summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/MapLike.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/scala/collection/MapLike.scala')
-rw-r--r--src/library/scala/collection/MapLike.scala7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/library/scala/collection/MapLike.scala b/src/library/scala/collection/MapLike.scala
index 6a9fffe3e1..057224a705 100644
--- a/src/library/scala/collection/MapLike.scala
+++ b/src/library/scala/collection/MapLike.scala
@@ -233,13 +233,10 @@ self =>
}
/** Transforms this map by applying a function to every retrieved value.
- * @param d the function used to transform values of this map.
- * @return an immutable map which maps every key of this map
+ * @param f the function used to transform values of this map.
+ * @return a map view which maps every key of this map
* to `f(this(key))`. The resulting map wraps the original map without copying any elements.
*/
- /** A map view resulting from applying a given function `f` to each value
- * associated with a key in this map.
- */
def mapValues[C](f: B => C): Map[A, C] = new DefaultMap[A, C] {
override def foreach[D](g: ((A, C)) => D): Unit = for ((k, v) <- self) g((k, f(v)))
def iterator = for ((k, v) <- self.iterator) yield (k, f(v))