Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Get an association of match positions to rule matches, sorted according to traversal scheme, for a combinator expression
ResourceFunction["CombinatorMatches"][cmb,scheme] gives an association of match positions to rule matches for S and K combinator transformations, sorted by scheme, for combinator expression cmb. | |
ResourceFunction["CombinatorMatches"][rules,cmb,scheme] gives an association of match positions to rule matches for rules, sorted by scheme, for combinator expression cmb. |
SKGlyphs | {CombinatorS,CombinatorK} | symbols used to specify default transformation rules |
Find the leftmost-outermost-sorted matches of the combinator expression in the SK basis:
In[1]:= | ![]() |
Out[1]= | ![]() |
Find the leftmost-outermost-sorted matches of the combinator expression in the SK basis:
In[2]:= | ![]() |
Out[2]= | ![]() |
Sort the SK basis matches of the expression in outermost-leftmost order:
In[3]:= | ![]() |
Out[3]= | ![]() |
Choose the first two SK basis matches of the expression from the innermost-rightmost evaluation order:
In[4]:= | ![]() |
Out[4]= | ![]() |
Find K combinator matches of an expression in rightmost-outermost order:
In[5]:= | ![]() |
Out[5]= | ![]() |
Group the match positions by the corresponding rule:
In[6]:= | ![]() |
Out[6]= | ![]() |
Extract rule-matched subexpressions of a combinator expression:
In[7]:= | ![]() |
Out[7]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License