Proposal: keep Data.Map.foldWithKey
Ross Paterson
ross at soi.city.ac.uk
Fri Jan 14 12:07:13 CET 2011
On Fri, Jan 14, 2011 at 11:13:31AM +0100, Gregory Collins wrote:
> hunk ./Data/IntMap.hs 117
> -- ** Fold
> , fold
> , foldWithKey
> + , foldlWithKey
> + , foldrWithKey
> + , foldlWithKey'
> + , foldrWithKey'
>
> [...]
> +{-# DEPRECATED foldWithKey "Use foldrWithKey instead" #-}
The additions improve consistency between Data.Map and Data.IntMap,
which is clearly the right thing to do.
I also believe that deprecating the redundant foldWithKey in both modules
is also a good first step toward trimming the redundancy from these APIs.
I would also favour deprecating fold in all four modules in favour of
Data.Foldable.foldr.
More information about the Libraries
mailing list