updateLookupWithKey bug? Was: Data.Map, Data.IntMap documentation (1611)

Christian Maeder Christian.Maeder at dfki.de
Fri Nov 2 13:40:02 EDT 2007

Iavor Diatchki wrote:
> Hi,
> I have always wondered about the usefulness of the "withKey" functions
> because the key is one of the arguments that the programmer is passing
> anyway, so they already know its value.
> Does anybody have other uses of the "withKey" functions?
> -Iavor

The WithKey-variants are used where a new value is computed from an old
one and when this function also needs to consider the key.

At least filterWithKey and foldWithKey are very useful.

> PS: as for the bug, I would just fix it (i.e., send a patch)

Which implementation do you consider buggy? IntMap or Map?

(or may just document it as inconsistent)

Cheers Christian

More information about the Libraries mailing list