Skip to content

Add fromListUpsert for Map and IntMap#1190

Merged
meooow25 merged 3 commits intohaskell:masterfrom
meooow25:fromlistupsert
Apr 12, 2026
Merged

Add fromListUpsert for Map and IntMap#1190
meooow25 merged 3 commits intohaskell:masterfrom
meooow25:fromlistupsert

Conversation

@meooow25
Copy link
Copy Markdown
Contributor

This is a little more powerful than fromListWith and also less error-prone because the type of the combining function makes it clear which value is old and which is new.

Closes #386

This is a little more powerful than fromListWith and also less
error-prone because the type of the combining function makes it clear
which value is old and which is new.
@meooow25
Copy link
Copy Markdown
Contributor Author

I'll merge this over the weekend if there are no concerns. fromListUpsert isn't the nicest name to be honest, but I can't think of a better one.

@meooow25 meooow25 merged commit 11887d4 into haskell:master Apr 12, 2026
17 checks passed
@meooow25 meooow25 deleted the fromlistupsert branch April 12, 2026 15:59
@meooow25 meooow25 mentioned this pull request Apr 13, 2026
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.

fromListWithDefault

1 participant