Proposal: keep Data.Map.foldWithKey

Gregory Collins greg at
Fri Jan 14 11:13:31 CET 2011

On Fri, Jan 14, 2011 at 8:56 AM, Sittampalam, Ganesh
<ganesh.sittampalam at> wrote:
> This isn't aimed at you specifically, but I suggest that if someone
> objects to a proposal on the grounds that an alternative route is
> better, they should actually propose that so that we can have a proper
> debate between the alternatives.

I agree. Patch attached.

Side note: there are tons of long lines and lines with dangling
whitespace in these files. It could use a cleanup. I also fixed the
docstrings for Data.Map.foldlWithKey and Data.Map.foldrWithKey.

> Removing foldWithKey from IntMap would (arguably) require foldrWithKey
> and foldlWithKey to be exposed instead. It seems Milan raised this in
> and there was no objection, but nothing further was done.

So symmetry (assuming one agrees it's so important to have it in the
first place) is still broken anyways if we roll back the "foldWithKey"

Gregory Collins <greg at>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foldXwithKey.patch
Type: text/x-patch
Size: 23885 bytes
Desc: not available
URL: <>

More information about the Libraries mailing list