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

Understanding decision merge #11

Closed
stuarthalloway opened this issue Oct 9, 2012 · 3 comments
Closed

Understanding decision merge #11

stuarthalloway opened this issue Oct 9, 2012 · 3 comments
Assignees
Milestone

Comments

@stuarthalloway
Copy link

The merge performed by a decision function is not a Clojure map merge, e.g. merging these two maps

{:request {:params {:a "1"}}}
{:request {:params {:b "2"}}}

will leave :params with both :a and :b keys. The current behavior is exactly what I wanted, but I had to test it to understand. I think docs need a different word than merge -- having now checked the impl I see you call it merge-map-element. Maybe there is a standard name from some other FP language...

@ordnungswidrig
Copy link
Member

This is one of the points that must be worked out in more detail before I want to release a 1.0. The current behavior is often the desired one, but you cannot remove an existing key. In any case the behavior and the motivation behind it must be documented.

@malcolmsparks
Copy link
Member

My suggestion is to rename it 'combine'. Since that name doesn't clash with
anything in clojure.core it will avoid confusion with clojure.core/merge
and clojure.core/merge-with

On 10 October 2012 08:20, Philipp Meier notifications@github.com wrote:

This is one of the points that must be worked out in more detail before I
want to release a 1.0. The current behavior is often the desired one, but
you cannot remove an existing key. In any case the behavior and the
motivation behind it must be documented.


Reply to this email directly or view it on GitHubhttps://github.com//issues/11#issuecomment-9292298.

@ordnungswidrig
Copy link
Member

Renaming to 'combine' sounds reasonable.

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

No branches or pull requests

3 participants