static L map(Iterable l, O f) { ret map(f, l); } static L map(O f, Iterable l) { L x = emptyList(l); if (l != null) for (O o : l) x.add(callF(f, o)); ret x; } ifclass F1 static L map(F1 f, Iterable l) { L x = emptyList(l); if (l != null) for (O o : l) x.add(callF(f, o)); ret x; } endif static L map(O f, O[] l) { ret map(f, asList(l)); } static L map(O[] l, O f) { ret map(f, l); } static L map(O f, Map map) { ret map(map, f); } // map: func(key, value) -> list element static L map(Map map, O f) { new L x; if (map != null) for (O _e : map.entrySet()) { Map.Entry e = (Map.Entry) _e; x.add(callF(f, e.getKey(), e.getValue())); } ret x; }