In order to run exploratory trials (for alpha-beta pruning, or some other optimizations) we need to copy state. We cannot copy closures in Python, nor in Lua. (Maybe in scheme?)
Instead, we can implement deep-copy for functor trees. That would be directly translatable to C++ as well, if we need the speed-up later.