Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Perform an update to a combinator expression based on defined rules and traversal scheme
ResourceFunction["CombinatorStep"][cmb] performs a single leftmost outermost update on the combinator expression cmb with S and K combinator transformations. | |
ResourceFunction["CombinatorStep"][cmb, scheme] performs an update on cmb according to matches found in scheme. | |
ResourceFunction["CombinatorStep"][rules, cmb, scheme] performs update with combinator transformations specified by rules. |
"SKGlyphs" | {CombinatorS,CombinatorK} | symbols used to specify default transformation rules |
Perform the default single leftmost outermost update on a combinator expression:
In[1]:= |
|
Out[1]= |
|
In[2]:= |
|
Out[2]= |
|
Update a combinator with the first three matches found from the rightmost outermost order:
In[3]:= |
|
Out[3]= |
|
In[4]:= |
|
Out[4]= |
|
Update an expression using only the K combinator transformation rule:
In[5]:= |
|
Out[5]= |
|
Update an expression using only the S combinator transformation rule in a single-update leftmost outermost evaluation scheme:
In[6]:= |
|
Out[6]= |
|
Update an expression using only the S combinator transformation rule in a leftmost innermost evaluation scheme:
In[7]:= |
|
Out[7]= |
|
Sometimes when a replacement is made at a particular position, the other match positions are changed, which prevents all the matches from being activated in a single step:
In[8]:= |
|
Out[8]= |
|
This work is licensed under a Creative Commons Attribution 4.0 International License