metosin / malli

High-performance data-driven data specification library for Clojure/Script.
Eclipse Public License 2.0
1.47k stars 209 forks source link

Coercion to support CPS #808

Closed ikitommi closed 1 year ago

ikitommi commented 1 year ago

Exception-free coercion with continuation-passing style:

(m/coerce :int "fail" nil (partial prn "success:") (partial prn "error:"))
; =prints=> "error:" {:value "fail", :schema :int, :explain ...}