Fork me on GitHub
#malli
<
2023-10-04
>
hifumi12302:10:37

What would be the best way to access properties of keys in a map schema? Suppose we have

(def example
  [:map
   [:foo {:default :x} [:enum :x :y :z]]
   [:bar {:default 0}  :int]])
The best I could think of is:
(reduce (fn [result [key properties]]
          (assoc result key properties))
        {}
        (m/children example))
But if a built-in malli utility exists for this, it would prefer that.