closure conversion

The transformation of continuation passing style code so that the only free variables of functions are names of other functions.

See also Lambda lifting.