THE SUPERCOMBINATOR lift every lambda to the top level — no nesting, no capture, just named functions
A supercombinator is a lambda with no free variables — a self-contained, top-level function. Lambda-lifting is the transform that turns any program into supercombinators: take each nested lambda, add its free variables as extra parameters, and hoist it to the top level with a name. Afterward the program is a flat set of named combinators applied to each other — no nesting, no environments to capture. Hughes introduced supercombinators as an implementation method for lazy languages; they were the target of the G-machine (dart 271's ancestor). It is closure conversion's close cousin, from the graph-reduction world.
THE TECHNIQUE lambda-lift: add free vars as params, hoist to top level
λx. x + n lambda-lifted to a named top-level combinator SC(n, x). The demo applies the lifted form: live demo
HISTORY & CREDIT John Hughes, 1982
“Nested functions need a runtime environment.” — lambda-lifting adds the free variables as parameters and hoists the function out, leaving a flat set of named combinators with nothing to capture. The nesting was removable all along. cited
1982 · John Hughes — supercombinators, a new implementation method for applicative languages. 1985 · Thomas Johnsson — the lambda-lifting algorithm. now · the front of graph-reduction backends; kin to closure conversion (dart 272).
Add the free variables as parameters, hoist, and every function is top-level and closed — a flat combinator program the reducer can run without a single environment. Hughes 1982
RECOMMEND FOR I-13 lambda-lifted application, computed
On the canonical compiler, the lifted combinator SC(n, x) = x + n at n=7, x=4 gives 11 — the one free variable now a parameter:
$ i13 run m_supercombinator.i13 # SC(7,4) = 4+7
RUN OK . 14 step(s) . peak stack 3 . call depth 1
lifted = 11
free_vars_lifted = 1
Recommend: every i13 function is a supercombinator. i13's grammar only allows top-level defs with no nesting and no free variables — which is the exact output of lambda-lifting. Where Hughes had to transform a nested program into flat combinators, i13's syntax admits nothing else: you cannot write a capturing inner lambda, so there is nothing to lift. This is the same fact as dart 272 (no closures) seen from the graph-reduction side. i13 is a supercombinator language by construction — the flat, nameable, capture-free shape both worlds converge on.