static Scored lambdaMapLike bestOfN_stopAtScore(IF1 scoreFunction, double stopScore, int nMax, IF0 produce) {
new Best best;
repeat nMax {
A a = produce!;
double score = scoreFunction.get(a);
best.put(a, score);
if (score >= stopScore) break;
}
ret best.scored();
}