malli

https://github.com/metosin/malli :malli:
Helins 2021-03-30T07:22:40.245200Z

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.

nilern 2021-04-01T08:58:31.295800Z

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.

Helins 2021-03-30T13:12:58.249Z

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?

ikitommi 2021-03-31T13:46:27.290700Z

shipped in 0.4.0 now

👍 1
nilern 2021-03-30T14:30:59.249300Z

https://github.com/metosin/malli/pull/405 (but still unreleased)

💯 1
nilern 2021-03-30T14:32:47.249600Z

I don't think there is any support for sorted colls specifically

Helins 2021-03-30T19:20:31.250100Z

Excellent, once again @ikitommi saves the day

Helins 2021-03-30T19:24:13.250300Z

Interesting, i can't find anything, no issue, nothing in the codebase...