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

Add unionWith and unionWithKey #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SiriusStarr
Copy link

unionWith is a pretty commonly used function, e.g. when counting occurrences, and unionWithKey is essentially free, since it's convenient to define unionWith in terms of it.

Dict.Extra.unionWith (+) (countOccurrencesIn a) (countOccurrencesIn b)

countOccurrencesIn : Expr -> Dict String Int

src/Dict/Extra.elm Outdated Show resolved Hide resolved
Doc comment accidentally referenced `unionWith` instead of `unionWithKey`

Co-authored-by: Jeroen Engels <[email protected]>
SiriusStarr added a commit to SiriusStarr/elm-review-no-single-pattern-case that referenced this pull request Oct 5, 2022
This can be removed if elm-community/dict-extra#29 is merged.
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

Successfully merging this pull request may close these issues.

2 participants