static Map web_matchAllPerms_partial_scoreF(Web patternWeb, Web inputWeb, O scoreFunction) { L patternNodes = web_nodes(patternWeb); L inputNodes = web_nodes(inputWeb); if (l(patternNodes) > l(inputNodes)) null; new Best> best; LL subsets = allSubsetsOfLength(l(patternNodes), inputNodes); for (L subset : subsets) { LL perms = allPermutations(subset); for (L perm : perms) best.put(perm, toDouble(callF(scoreFunction, patternNodes, perm))); } L l = best.getIfScoreAbove(0); ret l == null ? null : twoListsToOrderedMap(patternNodes, l); }