DEPRECATED foldWithKey "Use foldrWithKey instead"
johan.tibell at gmail.com
Wed Dec 8 16:09:52 CET 2010
On Wed, Dec 8, 2010 at 3:52 PM, Christian Maeder
<Christian.Maeder at dfki.de> wrote:
> Could someone (maybe the person who introduced it) simply delete it in
> the next version (or make a library proposal)?
We added it after a library proposal. The warning was there in the
docs already in 0.3. If you prefer a different design, write a library
> A matching "foldrWithKey" (and foldlWithKey) is missing in Data.IntMap.
> and folding without keys is also only given via "fold" in Data.Map.
That suggests we should add foldrWithKey and foldlWithKey to IntMap,
not remove them from Data.Map. Same goes for the without-key fold in
> Data.Set contains toList and toAscList and the former is rightly not
> deprecated. (A function toDescList is missing though in Data.Set.)
"Rightly"? You mean: you prefer to have both.
> Furthermore, Data.Map.foldrWithKey is not part of the container package
> that came with ghc-6.10.4.
Why does that matter? It's been in the two latest major version of containers.
More information about the Libraries