static A highestByFunction(Iterable l, O f) { A best = null; O bestValue = null; if (l != null) for (A a : l) { O val = callF(f, a); if (best == null || cmp(val, bestValue) > 0) { best = a; bestValue = val; } } ret best; } static A highestByFunction(O f, Iterable l) { ret highestByFunction(l, f); } static A lambdaMapLike highestByFunction(IF1 f, Iterable l) { ret highestByFunction(l, (O) f); } static A highestByFunction(Iterable l, IF1 f) { ret highestByFunction(f, l); }