

Functional programming idioms for an expression evaluator - traskjd
http://www.mindscape.co.nz/blog/index.php/2010/10/14/f-and-first-class-functions-part-4-doing-heavy-lifting/

======
wlievens
Tangentially related: the downside of using your functional environment to map
an expression evaluator on, is that your instruction stack is out of your
control. If your expression language doesn't contain loops or recursion that's
fine, because you can guarantee your program terminates (simpel formulae are
not turing complete iirc) but if it's any more complex, you will want to be
able to pause or terminate execution without killing your evaluator thread. Or
you may want to do concurrency or special return semantics or stuff like that.
For these reasons you'll want to go beyond the early-chapter SICP technique of
a recursive (eval exp env) and manage an instruction stack yourself.

