Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data.Map lacks unionsWithKey #137

Open
nomeata opened this issue Feb 15, 2015 · 2 comments
Open

Data.Map lacks unionsWithKey #137

nomeata opened this issue Feb 15, 2015 · 2 comments

Comments

@nomeata
Copy link
Contributor

nomeata commented Feb 15, 2015

Hi,

I currently see

union :: Ord k => Map k a -> Map k a -> Map k a
unionWith :: Ord k => (a -> a -> a) -> Map k a -> Map k a -> Map k a
unionWithKey :: Ord k => (k -> a -> a -> a) -> Map k a -> Map k a -> Map k a
unions :: Ord k => [Map k a] -> Map k a
unionsWith :: Ord k => (a -> a -> a) -> [Map k a] -> Map k a

so it would be only consistent to have a

unionsWithKey :: Ord k => (k -> a -> a -> a) -> [Map k a] -> Map k a

as well.

@sjakobi
Copy link
Member

sjakobi commented Jul 15, 2020

unionsWith :: Ord k => (a -> a -> a) -> [Map k a] -> Map k a

This one appears to be gone?!

Here are some slightly related discussions on unordered-containers: haskell-unordered-containers/unordered-containers#240, haskell-unordered-containers/unordered-containers#118

@sjakobi
Copy link
Member

sjakobi commented Jul 15, 2020

unionsWith :: Ord k => (a -> a -> a) -> [Map k a] -> Map k a

This one appears to be gone?!

Not sure why I missed this. We have

unionsWith :: (Foldable f, Ord k) => (a -> a -> a) -> f (Map k a) -> Map k a

today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants