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

merge union and unionWith #4

Open
sebastian-philipp opened this issue Apr 22, 2014 · 2 comments
Open

merge union and unionWith #4

sebastian-philipp opened this issue Apr 22, 2014 · 2 comments

Comments

@sebastian-philipp
Copy link
Owner

What about:

union :: Monoid a => StringMap a -> StringMap a -> StringMap a

the current union uses const as the combination function. Instead, we should use Monoid a, because Monoid is in my opintion a perfect match for this problem.

@sebastian-philipp sebastian-philipp changed the title merge untion and untionWith merge union and unionWith Apr 22, 2014
@UweSchmidt
Copy link
Collaborator

A reason against this is, we then don't have the same interface as Data.Map.

A switch from

import qualified Data.Map as M
...
type MyMap v = M.Map String v

to

import qualified Data.StringMap as M
...
type MyMap v = M.StringMap v

should always be possible without changing anything else.

@sebastian-philipp
Copy link
Owner Author

haskell/containers#43

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

No branches or pull requests

2 participants