Runtime evaluation/In an environment: Difference between revisions

trying to clarify some more...
(→‎{{header|Metafont}}: if the problem was the "global" variable... fixed (as tcl, similar to php))
(trying to clarify some more...)
Line 1:
{{task}} Given a program in the language (as a string or AST) with a free variable named <var>x</var> (or another name if that is not valid syntax), evaluate it with <var>x</var> bound to a provided value, then evaluate it again with <var>x</var> bound to another provided value, then subtract the result of the first from the second and return or print it.
 
Do so in a way which:
* does not involve string manipulation of the input source code
* is plausibly extensible to a runtime-chosen set of bindings rather than just <var>x</var>
* does not make <var>x</var> a ''global'' variable