# The Spineless Tagless G-Machine

WIP. This will hopefully be expanded into a thorough walkthrough of the state machine.

Evaluation is complete when a single `NNum` remains on the stack and the dump is empty.

Dereference an indirection passed as an argument to a function.

Dereference an indirection on top of the stack.

Perform a unary operation with internal `Prim` constructor `O` on an argument in normal form.

Evaluate the argument of a unary operation with internal `Prim` constructor `O`.

Restore the stack when a sub-computation has completed.

Reduce a supercombinator and update the root with the -reduced form

Perform a binary operation associated with internal `Prim` constructor `O` on two `NNum` s both in normal form.

In a conditional primitive, perform the reduction if the condition has been evaluated as True (`NData 1 []`).

In a conditional primitive, perform the reduction if the condition has been evaluated as False (`NData 0 []`).

In a conditional primitive, evaluate the condition.

Construct `NData` out of a constructor and its arguments

## Pairs

Evaluate the first argument if necessary

Perform the reduction if the first argument is in normal form

## Lists

Evaluate the scrutinee

If the scrutinee is `Nil`, perform the appropriate reduction.