Proposal: more general unionWith for Data.Map
wren ng thornton
wren at freegeek.org
Fri Jan 27 03:23:34 CET 2012
On 1/24/12 2:52 PM, Johan Tibell wrote:
> On Tue, Jan 24, 2012 at 11:42 AM, Christian Sattler
> <sattler.christian at gmail.com> 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.
I'd just like to point out that bytestring-trie has some prior art using
the name "merge"[1]. AKA, +1 for that name and variants thereof.
[1]
http://hackage.haskell.org/packages/archive/bytestring-trie/0.2.3/doc/html/Data-Trie.html#v:mergeBy
--
Live well,
~wren
More information about the Libraries
mailing list