In addition to tweaking the two programs, I want to create a third calculator function that takes the general form of the lambda equation, and calculates the SKcombinators necessary to produce the desired result. For example, just picking one at random, let's say that I took the lambda form of:
labc.((ac)b)
Now, from looking at the bird chart, I can see that this is the form of the Cardinal, and it can be defined with SK as ((S((S(K((S(KS))K)))S))(KK)). Or I can just do trial and error with the B, C, S, and I combinators until I came up with the desired SKCombinator.
What I really want, though, is to input the form of the lambda equation, and have the computer calculate the necessary SK combinator to achieve the result. In chapter 18 of Smullyan's book, he describes a general method using an aeliminate and 4 Principles. I suppose it might not be a bad exercise to convert his verbiage into a working algorithm for JavaScript. But I was kind of hoping that someone already has an available set of code to accomplish the chore.
