
25 Jun
2011
25 Jun
'11
9:33 p.m.
On 6/25/11 1:07 PM, Evan Laforge wrote:
In the case of the overriding version, you have to decide on which side to merge the new monoid, and on the lifted one the two choices become four, since you then have to decide whether the unionWith argument should be flipped or not. [...] So I think the Data.Map choice is reasonable for that reason. If it were lifted, it would have to make a hard-coded decision about the "side". If you have to write your own, that's under your control.
You should pass them through in the same order, to maximize intuitability. Order swapping can be handled by the Dual newtype. -- Live well, ~wren