The C code exploits features in the GNU compiler that are not
typically available on other compilers.
Principle among these is nesting of procedure definitions.
An internal definition can be moved outside the outermost containing
routine if:
- This does not introduce name conflicts,
- All of the free variables of the body of the procedure are
parameters of that procedure.
When there are additional free variables, it is usually possible
to add more parameters to the routine as it is exported.
Call sites will have to be modified to pass the values otherwise
accessible from where the procedure was defined.