8000 BREAKING: concat Lists when merging deeply by leebyron · Pull Request #1344 · immutable-js/immutable-js · GitHub
[go: up one dir, main page]

Skip to content

BREAKING: concat Lists when merging deeply #1344

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

Merged
merged 1 commit into from
Oct 5, 2017
Merged

Conversation

leebyron
Copy link
Collaborator
@leebyron leebyron commented Oct 5, 2017

Fixes a long standing issue where "merge" did not treat List as an expected monoid form, overwriting entries as if it were a Map instead. This changes merge on List to be an alias of concat (much like merge is an alias for union on Set). Other functions like mergeDeep and mergeWith have been removed from List, since they no longer make sense with this behavior. When mergeDeep is called on a Map, nested Lists are now concatenated instead of overwritten.

Fixes #406

Fixes a long standing issue where "merge" did not treat List as an expected monoid form, overwriting entries as if it were a Map instead. This *changes* `merge` on List to be an alias of `concat` (much like `merge` is an alias for `union` on Set). Other functions like `mergeDeep` and mergeWith` have been *removed* from List, since they no longer make sense with this behavior. When `mergeDeep` is called on a Map, nested Lists are now concatenated instead of overwritten.

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

Successfully merging this pull request may close these issues.

2 participants
0