Fork me on GitHub
#malli
<
2023-09-25
>
Samuel Ludwig18:09:51

Whats the prescribed manner in which to write => function specs for defmulti forms/clauses, where the signature varies between each defmethod? Not seeing anything specific in the docs

ikitommi18:09:28

there is nothing for that at the moment, but would :multi get you anywhere close to what you want?

Samuel Ludwig19:09:30

thats what i thought of first, but i was unsure "where" the :multi defs belonged in the schema/how i would dispatch

Samuel Ludwig19:09:59

As in, suppose I wrapped multiple :=>'s in the :multi, and I was dispatching based off the first argument of the multi-fn: how should i reference that first argument?

Samuel Ludwig19:09:34

separate question, is there a go-to way to denote an atom, or a delayed value? also can't find a clear answer on the docs

ikitommi04:09:14

nothing bult-in, but you can use :fn or m/-simple-schema to create such behavior

ikitommi04:09:41

e.g. [:fn delay?].