Combinators - TinyAPL

A combinator is a function or operator that only refers to its arguments and operands without modifying them in any way. Symbol APL expression Bird(1) TinyAPL Diagram I \mathrm I I y Identity ⊣/⊢ K \mathrm K K x Kestrel ⊣ κ \kappa κ y Kite ⊢ W \mathrm W W y F y Warbler ⍨ C \mathrm C C y F x Cardinal ⍨ B \mathrm B B F (G y) Bluebird ∘/⍤/⍥ Q \mathrm Q Q G (F y) Queer ⍛ B 1 {\mathrm B}_1 B1​ F (x G y) Blackbird ⍤ Ψ \Psi Ψ (G x) F (G y) Psi ⍥ S \mathrm S S y F (G y) Starling ⟜/⇽ Σ \Sigma Σ (F y) G y Violet Starling ⊸/⇾ D \mathrm D D x F (G y) Dove ∘/⟜ Δ \Delta Δ (F x) G y Zebra Dove ⍛/⊸ Φ \Phi Φ (F y) G (H y) Phoenix «» Φ 1 \Phi_1 Φ1​ (x F y) G (x H y) Pheasant «» D 2 {\mathrm D}_2 D2​ (F x) G (H y) Dovekie ⊸ + ⟜ P \mathrm P P (y G x) F (x G y) Parrot(2) ⸚ N \mathrm N N x F (x G y) Eastern Nicator ⇽ ν \mathrm \nu ν (x F y) G y Western Nicator ⇾ Additionally, some other primitives have combinator-like behavior: APL expression TinyAPL Diagram n ⍨ n ⍨ F y ⁖ x G y ⁖ Footnotes Some combinators have bird names, originating from To Mock a Mockingbird by Raymond Smullyan. Some of the bird names are taken from the Uiua combinator page. I made this one up.

Could somebody provide a bit of context on what exactly this is? It seems interesting, but I have no idea what I am looking at.

Many primitives in array languages match the behaviour of certain combinators in combinatory logic. The page shows (left to right) the symbol for a certain combinator, its effective operation in APL syntax where x and y are left and right arguments (APL operators are either infix or single-parameter prefix) and F and G are similarly left and right function arguments, the 'bird' is a sort of colloquial name for a particular combinator, 'TinyAPL' is the operator that matches the combinator in the author's APL implementation, and the diagram is a way of explaining how the combinator works visually

BQN, another array language has a page of documentation describing the same concept for their language with a bit more explanation for the combinator newcomer: https://mlochbaum.github.io/BQN/tutorial/combinator.html

BQN Tutorial: Combinators

Can we solve for x and y? All I see is algebra here, is my intuition wrong?

It's more like a recipe (for functions).

The first example, I, is an identity function. It takes y and returns y.

The second, K, is a constant which takes X and y and returns x.

This gets more complicated as you go along. The idea is that you get rid of a lot of the syntax for composition and have it all be implicit by what you put next to each other (given APL programs are usually one long line of a bunch of different symbols all representing functions).

The intuition here is that combinators are higher order functions which take functions and combine them together in various ways. So for a simple example "fix" is a combinator in regular maths where

Fix f = {f(x): f(x) = x for all x in the domain of f}

So if f is a function or a group action or whatever, the fixed-point set of f is all points x in the domain of f such that f(x)=x. ie the points which are unchanged by x. So if f is a reflection, the points which sit on the axis of reflection.

The fixed-point combinator is of particular relevance to this site because it's often called the y combinator.

Combinators can be a bit sill for values. The usefulness come when you use them as a meta language for functions.