Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Show the evolution of a combinator expression to its fixed point based on defined rules and an evaluation scheme
ResourceFunction["CombinatorFixedPointList"][cmb] shows the evolution of the combinator expression cmb to its fixed point using S and K combinator transformation rules and single leftmost-outermost updating order. | |
ResourceFunction["CombinatorFixedPointList"][cmb] shows the evolution of the combinator expression cmb to its fixed point using S and K combinator transformation rules and single leftmost-outermost updating order. | |
ResourceFunction["CombinatorFixedPointList"][cmb,scheme] shows the evolution of cmb to its fixed point using S and K combinator transformation rules in matches found by scheme at each step. | |
ResourceFunction["CombinatorFixedPointList"][rules, cmb,scheme] shows evolution cmb to its fixed point using rules in matches found by scheme at each step. |
MaxSteps | Infinity | maximum steps to take in evolving cmb |
"MaxSize" | Infinity | maximum leaf count allowed for evolution of cmb |
"SKGlyphs" | {CombinatorS,CombinatorK} | symbols used to specify default transformation rules |
Show steps of the fixed point evolution of a combinator expression using the default single leftmost-outermost update with S and K combinator transformation rules:
In[1]:= |
Out[1]= |
Specify the update scheme and only use the K combinator transformation rule to show the fixed-point evolution of the combinator expression:
In[2]:= |
Out[2]= |
Calculate the leaf count of each expression generated during an evolution:
In[3]:= |
Out[3]= |
Show the steps of the fixed-point evolution of a combinator expression using the default single leftmost-outermost update with S and K combinator transformation rules:
In[4]:= |
In[5]:= |
Out[5]= |
One can show a similar fixed-point evolution using ReplaceAll in FixedPointList, which performs all non-overlapping updates in leftmost-outermost order:
In[6]:= |
Out[6]= |
If the option values for "MaxSize" or "MaxSteps" are surpassed, the returned evolution ends before reaching a fixed point:
In[7]:= |
Out[7]= |
In[8]:= |
Out[8]= |
This work is licensed under a Creative Commons Attribution 4.0 International License