static Map mapKeys(O func, Map map) { Map m = similarEmptyMap(map); // TODO: this might break when key type changes through func for (O key : keys(map)) m.put(callF(func, key), map.get(key)); ret m; } static Map mapKeys(Map map, O func) { ret mapKeys(func, map); } static Map mapKeys(Map map, IF1 func) { ret mapKeys(map, (O) func); } static Map lambdaMapLike mapKeys(IF1 func, Map map) { ret mapKeys(map, func); } ifclass MultiMap static MultiMap mapKeys(IF1 f, MultiMap mm) { ret mapMultiMapKeys(f, mm); } endif ifclass MultiSetMap static MultiSetMap mapKeys(IF1 f, MultiSetMap mm) { ret mapMultiSetMapKeys(f, mm); } endif