Robert,
I've been a little confused lately when looking at the environment data returned by run_string/3. In particular, what I see is a state tuple that contains several env tuples. So my questions are these:
1) what are the various environment tuples for? I had naively assumed there would be only one
2) which env tuple should be passed as the third argument to run_string/3 in the next call to it?
3) I'm assuming that state shouldn't be passed (the collections of envs), since run_string/2 passing lfe_env:new/0 as the third arg to run_string/3, and it creates the tuple #(env () ()).
Hrm, I've just saved each env data structure into a file and diff'ed them against each other:
1) it seems that the env in the first position is the environment created after executing the function -- it has the * and + values associated with the results.
2) the differences between the second and third env are less clear to me. It looks like the primary difference is that the dynamic functions have been updated in one and note the other.
So I guess this answers one of my questions: I should use the first env data structure.
That still leaves the more interesting question: what are these used for?
d