code: public static <K, V, K2, V2> MutableMap<K2, V2> collect(
              Map<K, V> map,
              Function2<? super K, ? super V, Pair<K2, V2>> function)
      {
          return MapIterate.collect(map, function, UnifiedMap.<K2, V2>newMap(map.size()));
      }
docs: For each value of the map, the function is evaluated with the key and value as the parameter.
  The results of these evaluations are collected into a new UnifiedMap.