generalize type of Data.Set.unions from List to Foldable
David Feuer
david.feuer at gmail.com
Sun Feb 4 20:09:39 UTC 2018
No, but it can still be written quite easily:
unionsWith f = foldl' (unionWith f) M.empty
Is that really hard enough to merit the API clutter? Maybe, but I doubt it.
On Sun, Feb 4, 2018 at 2:47 PM, Johannes Waldmann
<johannes.waldmann at htwk-leipzig.de> wrote:
>
>> 2. Deprecate and remove.
>
> Removal is good. (Less code, less errors ...)
>
> But the following cannot be obtained via Foldable.fold ?
>
> unionsWith :: Ord k => (a -> a -> a) -> [Map k a] -> Map k a
>
> - J.W.
More information about the Libraries
mailing list