static Scored lambdaMapLike bestOfN(IF1 scoreFunction, int n, IF0 produce) { new Best best; repeat n { A a = produce!; double score = scoreFunction.get(a); best.put(a, score); } ret best.scored(); }