A plain implementation of lambda calculus, nothing special (it is vanilla). This was created in order to implement Conway’s Game of Life, read about it here.
The code is functional. Terms can share references in memory, but are reduced separately. To get improved speeds two values are attached to each term: dirty and depth. Dirty is true if there exists the possibility of reductions inside the term. Depth is the value of the outer-most variable used inside the term. A clean term is not reduced and depth can determine if substitutions are necessary.