Demo of implementing dynamically scoped variables using a hidden
dyn
parameter passed to every function, as described
in
A Functional Implementation of Dynamic Scope.
Quite slow as it runs on top of a compatibility layer on top of Arc3.1 with no attempt at optimization, but sufficient to run tests.
racket -f run.scm