gives an association of match positions to rule matches for rules, sorted by scheme, for combinator expression cmb.
Details and Options
ResourceFunction["CombinatorMatches"] finds rule matches, instances where the rules can be applied to parts of cmb. The keys of the association are the positions of the rule matches within cmb. The values of the association refer to the index in rules of the applicable combinator transformations.
The argument cmb must be given as a combinator expression in nested bracket form.
In scheme, both direction ("Leftmost" or "Rightmost") and depth order ("Outermost" or "Innermost") must be specified, in order of their priority as sorting criteria.
The scheme, which is a list, can include an optional third element, specified as an integer number or Infinity, that indicates how many elements from the sorted list should be given.
The combinator transformations of interest should be given as a list of Rule or RuleDelayed elements in rules.
ResourceFunction["CombinatorMatches"] takes the following option: