code: public static <T,K> Function<T,Void> addTo(final Map<K,T> map, 
                                                 final Function<? super T, ? extends K> keyMaker) {
          return new Function<T,Void>() {
              public Void apply(T arg) {
                  map.put(keyMaker.apply(arg), arg);
                  return null;
              }
          };
      }
docs: Returns a function that adds its argument to a map, using a supplied function to determine the key.
  
  @param map The map to modify
  @param keyBuilder A function to determine a key for each value
  @return A new function that adds its argument to <code>map</code> by using
  <code>keyBuilder.apply(argument)</code> to determine the key.