Fork me on GitHub

Hello, I want to build a general data-building ui, that takes a description of the datastructure as input (a malli schema, this time around). I couldn’t find much prior work in this regard. I have a half-baked prototype here: So far, that mostly works for int? string? boolean? :vector and :map and combinations of them. So do you know of anything similar?


As for the implementation, I’m using a local atom and this multimethod:

Yehonathan Sharvit06:06:27

I'd like to validate inside a function that the function is called with valid arguments. Should I use :=> ? How exactly?


README should cover that

Yehonathan Sharvit09:06:06

The readme doens't cover it

Yehonathan Sharvit12:06:54

Here is what I am doing

Yehonathan Sharvit12:06:18

(def =>plus [:=> [:cat int? int?] int?])

(defn plus [x y]
      (m/validate (second =>plus) [x y])
    (throw (ex-info "invalid input" {})))
  (+ x y))

Yehonathan Sharvit12:06:28

Is there a more idiomatic way?


there will be malli.instrument, while waiting, there is malli-indtrument -

Yehonathan Sharvit07:06:35

Very cool! Any reason why it's not yet part of malli?


just time to merge & cleanup, the original issue is here:


the function checker code shuould be reused between malli.generate and malli.instrument.

Yehonathan Sharvit07:06:01

Is someone already working on this consolidation?


please ask on the issue. on my summer backlog if no-one has time. need this too after the vacations.


Is there something I can do to make the results of mu/union more condensed?

(mu/union (mu/union nil? empty?) empty?)
=> [:or [:or nil? empty?] empty?]