MapValues - scala-lang.org
www.scala-lang.org › MapView$$MapValuesBuilds a new collection by applying a partial function to all elements of this map on which the function is defined. def collectFirst [B] (pf: PartialFunction [ (K, W), B]): Option [B] Finds the first element of the collection for which the given partial function is defined, and applies the partial function to it.