The Javascript program in this page evaluates expressions of the SKI combinator calculus, built of the combinators i, k, and s and the application operator ` (so that `xy is x applied to y). It lacks the lambda operator; but any function built from these combinators and lambda is either
The combinators are defined as follows.
This program will evaluate an expression of the combinator calculus until either there are no instances of i, k, or s with one, two, or three curried arguments, respectively, or for 728 steps, where at each step the earliest evaluatable function is selected. Before evaluation, whitespace is removed, and up to 8 replacements are made of #?# with the contents of the input area labelled #?# or of #n#, where n is a positive integer not exceeding 9, with a representation of the Church integer n. After these replacements every character other than ` is treated as a single function. The intermediate steps of the evaluation will be shown iff the box labelled 'Show Steps' is checked, otherwise only the final result will be shown. The output area will be cleared before any evaluation iff the box labelled 'Clear Output' is unchecked.