On Sat, Sep 12, 2015 at 8:44 AM, John Cowan <xxxxxx@mercury.ccil.org> wrote:
 
You are very elliptical, but I take this to be handled by making sure
that the new scope is preferred to the old when merging, which argument
order can arrange.  The only case where you need a merge proc is when
it's data-dependent which value is to be preserved.

Okay, here's one I just encountered: In Hopcroft's DFA minimization algorithm, one must collect all states that have edges arriving at a chosen state, grouping them by the character on the edge.  A natural representation for each state, in this algorithm, is as a hash table mapping characters to sets of states.  Merging, then, is computing the union of all sets of states for each character.  In this case, it's probably most natural to use the functional version, but it's good to expose the imperative version for efficiency in cases where accumulation doesn't happen all at once.