Eg Zip

This root program defines a procedure that builds an environment from lists of names and values.

Being recursive, zip calls itself; the value in the (const zip (code zip ...)) instruction is a circular pointer. This avoids an explicit recursive environment construct, or a special top-level environment. The final ... in the stucture hides the memo table used by cogen.

The code is graphically represented like this:

ps

Code structures start with a rectangle labeled with the name of the code. Each straight list of instructions is represented with an oval. Lists ending with an if instruction are labeled with the name of the tested variable, those ending with a jump are linked with a solid edge to the called code. If the jump target is unknown (as when a procedure returns) then the oval is terminal.

(see envs)