-
Notifications
You must be signed in to change notification settings - Fork 5
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
Smarter deep merging of maps in sequentials #9
Comments
The result is the expected behaviour. Meta-merge aims to be unambiguous in how it merges data sets. Vectors are always concatenated together: (meta-merge [1 2] [3 4])
=> [1 2 3 4] In order to support the behaviour you expect, meta-merge would have to try to guess what the user wants depending on how similar elements are. |
Got it. I wonder if your metadata usage could or should be used to specify desired behavior of more use cases?
Or maybe my use case is just too specific. |
Do you have any suggestions for metadata that would support the behaviour you want? |
I imagine it would just be a named behavior, but it would need to affect the entire tree. (meta-merge
{:foo [{:bar [1]}]}
{:foo ^:merge-sequential [{:bar [2]}]}) I'm not sure, TBH. |
Not sure if this project aims to address this particular case, but here's an example that didn't work as expected:
Result:
Expected:
The text was updated successfully, but these errors were encountered: