Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Evolve a combinator expression for a certain number of steps based on defined rules and an evaluation scheme
ResourceFunction["CombinatorEvolve"][cmb,t] evolves the combinator expression cmb across t steps using S and K combinator transformation rules and single leftmost-outermost updating order. | |
ResourceFunction["CombinatorEvolve"][cmb,t,scheme] evolves cmb using S and K combinator transformation rules in matches found by scheme. | |
ResourceFunction["CombinatorEvolve"][rules,cmb,t,scheme] evolves cmb using rules in matches found by scheme. |
| "MaxSize" | Infinity | maximum leaf count allowed for evolution of cmb |
| "SKGlyphs" | {CombinatorS,CombinatorK} | symbols used to specify default transformation rules |
Evolve a combinator expression for five steps using the default S and K combinator transformation rules in the single-match leftmost-outermost updating scheme:
| In[1]:= |
| Out[1]= |
Evolve a combinator expression for five steps, specifying that only the S combinator rule should be used in an all-match rightmost-innermost updating scheme:
| In[2]:= |
| Out[2]= |
The "MaxSize" option can be useful for avoiding excessively long combinator evolutions, but will throw a failure if its value is surpassed:
| In[3]:= |
| Out[3]= |
CombinatorEvolve returns the fixed-point value if the expression has stopped evolving:
| In[4]:= |
| Out[4]= |
| In[5]:= |
| Out[5]= |
This work is licensed under a Creative Commons Attribution 4.0 International License