Proposal: more general unionWith for Data.Map

Milan Straka fox at
Tue Jan 24 20:58:06 CET 2012

Hi Johan,

> On Tue, Jan 24, 2012 at 11:42 AM, Christian Sattler
> <sattler.christian at> wrote:
> > I don't care much about the naming, but note that the analogous
> > property already fails for the generalized intersectionWithKey in the
> > development version.
> I suspected as much. I think the current intersectionWithKey is
> broken. We should have a single function, mergeWithKey, that allows
> people to do the things they currently do using Maybe return values in
> e.g. intersectionWithKey.

Funnily, I just also used mergeWithKey for the "ultimate combining
function" in this thread :)

FYI, the new intersectionWithKey is not released yet -- maybe we could
leave intersectionWithKey as it is, and provide mergeWith[Key] instead.


More information about the Libraries mailing list