Open den1k opened 3 years ago
Currently, a MapEntry is treated as a data value :val
.
Is it desirable to treat it as a data type of its own? If the use case is common enough, we can do that.
Context for my case is that https://github.com/metosin/malli#value-transformation returns a sequence of MapEntries: https://github.com/metosin/malli/blob/4671ea3a670dda6289f550ff557e10abea799329/src/malli/core.cljc#L1747
I think it's desirable solely for the reason that it would be more correct the diffing for MapEntry is currently broken. If this is low effort and performance hit is negligible I think it would be great to have this.
Sounds reasonable. I will get to it when I get some time.
Maybe think about ways to make this extensible.
This contains an update path:
This replaces the top level MapEntry:
Running into this issue using https://github.com/metosin/malli#parsing-values where parts of the parse-tree are MapEntries.