Combinatorial logic has the concept of a "base," a small set of atomic combinators that are assumed to exist. Then, one builds all the other combinators from the given base. This shows that the base is universal, because anything written with all the other combinators can be written with just the base.
In the tradition of "rubber duck design," here's how it could work in Concatenative Combinators (https://tunes.org/~iepos/joy.html):
CC already has "constructions," which are a formal way of building a combinator out of other combinators. For example, `dig` can be defined as a proper combinator:
[C] [B] [A] dig == [B] [A] [C]
Or it can be described as a construction:
[C] [B] [A] dig == [C] [B] [A] [] cons cons dip
What if we allow a combinator to have multiple definitions: One proper/atomic, and zero or more constructions?
Likewise, what if we declare a base up front. Now when resolving names, if a name isn't part of the base, the interpreter can check its construction(s) to see if any can be resolved.
This could be recursive. If the base is the SK or SKI combinator logic, then both `cons` and `dip` would also need constructions for us to resolve `dig`.
This resembles package dependency management.
———
The simplest way to make this work is given in TFA: The base `swap, dup, zap, unit, cat, cons, i, dip` is given first, and then constructions are given based on that base.
For other bases, if we write instructions for swap, dup, zap, unit, cat, cons, i, and dip, all the other constructions will follow naturally.
WIP on this #conctenativelanguage idea. Here we define `cons`.
1. Quoted placeholders that match what must be to the left of `cons`;
2. A proper (closed over the placeholders only) definition of how to rewrite the matching quoted placeholders if `cons` is part of the base, and;
3. Alternate constructions given for building `cons` given the `coup-sap`, `s'-k`, and `cake-k` binary bases.
Now working on the “trivial” problem of resolving `cons` to the correct proper combinator or construction.