malli

doojin 2026-03-07T05:05:25.438439Z

I'm trying to finish reading malli README.

(m/decode
  [:map
   {:decode/math {:enter #(update % :x inc)
                  :leave #(update % :x (partial * 2))}}
   [:x [:int {:decode/math {:enter (partial + 2)
                            :leave (partial * 3)}}]]]
  {:x 1}
  (mt/transformer {:name :math}))
Here, what does {:name :math} mean? (doc mt/transformer) doesn't say anything.

opqdonut 2026-03-09T06:27:14.684149Z

It means "please transform using the user-defined transformer :math , which is implemented in the malli properties :decode/math (and :encode/math)"