Is there a way of generating sorted maps using :map-of
? Spec allows that and it is indeed very useful when working with sorted colls.
It never comes up in input validation and our DbC story is not really there yet. Whereas Spec was basically created for DbC and third party tools are needed for most other things.
Hmmm, took me a while to realise that was a source of error and I cannot seem to find how to merge such maps:
[:merge
[:map [:a :int]]
[:and
[:map [:b int]]
[:fn some-pred]]]
The problem is that the second map is enclosed by [:and]
, and Malli doesn't seem to understand that it is ultimately a map, meaning that :merge
does not behave like it is merging 2 maps.
How can I merge them while keeping that custom predicate?shipped in 0.4.0 now
https://github.com/metosin/malli/pull/405 (but still unreleased)
I don't think there is any support for sorted colls specifically
Excellent, once again @ikitommi saves the day
Interesting, i can't find anything, no issue, nothing in the codebase...