chatziko / lci

A lambda calculus interpeter
https://www.chatzi.org/lci/
GNU General Public License v2.0
64 stars 7 forks source link

add some combinators to the standard library #5

Closed HalosGhost closed 5 years ago

HalosGhost commented 5 years ago

Add S, K, and I (for anyone who might want to play with SKI-calculus) Add Iota (for Iota-calculus)

The reason Iota is so interesting is because S, K, and I can all be derived from it (i.e., it is self-sufficiently turing-complete), but I define S, K, and I separately as a performance measure

HalosGhost commented 5 years ago

A question for you @chatziko:

With these added, how do you feel about my going through the rest of the “standard library” and leveraging these combinators where it makes sense?

e.g.:

-True   = \x.\y.x;
+True   = K;

Additionally, while doing this; would you be bothered by my making more consistent use of tabs vs. spaces to clean up the file generally?

HalosGhost commented 5 years ago

In addition, would you be interested in accepting anything else to the stdlib (e.g., Fold, Scan and other list-functions, or a factorial function (and perhaps an accompanying ! operator))?

HalosGhost commented 5 years ago

Sorry for my impatience, but I am really excited about moving forward with a lot of plans for this. I am going to go ahead and close this and maintain a fork. If ever you are interested in merging some changes back upstream, please let me know; I will be happy to work with you!