static A bestAccordingTo(Collection l, O scoreFunction) { new Best best; for (A a : l) best.put(a, toDouble(callF(scoreFunction, a))); ret best.get(); }