Skip to content

Add unionWith and unionWithKey#29

Open
SiriusStarr wants to merge 2 commits intoelm-community:masterfrom
SiriusStarr:master
Open

Add unionWith and unionWithKey#29
SiriusStarr wants to merge 2 commits intoelm-community:masterfrom
SiriusStarr:master

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

Doc comment accidentally referenced `unionWith` instead of `unionWithKey`

Co-authored-by: Jeroen Engels <jfm.engels@gmail.com>
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