malli

https://github.com/metosin/malli :malli:
ikitommi 2021-02-23T06:26:24.052400Z

no need to wrap into :and, this works too: [:string {:min 0, :max 100, :gen/min 10, :gen/max 20, :gen/fmap (partial * 2)}]

👍 1
ikitommi 2021-02-23T06:27:36.052600Z

the default schema generators are implemented as multimethods, so for global effects, one can just re-mount generator fof 'inst? for example. not recommended.

ikitommi 2021-02-23T18:12:59.057900Z

final change to figure out proper names for named branch -variants for: :cat, :alt and :or. they are currently :cat*, :alt* and :or* :face_with_rolling_eyes:

(m/parse
  [:*
   [:alt* 
    [:s :string]
    [:i :int]]]
  [1 "2" 3 "4"])
; => [[:i 1] [:s "2"] [:i 3] [:s "4]]

ikitommi 2021-02-23T18:14:20.058500Z

:catn, :altn & :orn?

ikitommi 2021-02-23T18:14:38.058900Z

:cat-named, :alt-named & :or-named?

✅ 3
ikitommi 2021-02-23T18:15:25.059600Z

:alley-cat, :danger-mouse & :skeletor?

😆 3