// discriminator: func(A) -> bool static > Scorer scoreDiscriminator(O discriminator, Pair p) { new Scorer scorer; for (A a : unnull(p.a)) scorer.add(isTrue_callF(discriminator, a), a); for (A a : unnull(p.b)) scorer.add(!isTrue_callF(discriminator, a), a); ret scorer; }