Fork me on GitHub
#malli
<
2021-10-01
>
zane14:10:52

What is the meaning of the error :malli.core/potentially-recursive-seqex?

ikitommi16:10:15

I believe it's documented on README &/ source code.

zane16:10:49

I looked through both and it’s not readily apparent to me.

ikitommi16:10:06

I'll try: it's a design choice to keep the parsing fast and simpler: You can't recur from a sequence itself, but you can recur from a element in the sequence. http://malli.io has an example how hiccup works.

ikitommi16:10:34

e.g. wrap the :ref inside a :schema forcing it out of the secuence to it's own schema.

zane16:10:21

That’s extremely helpful. Thanks!

Carsten Behring20:10:06

I am struggling to define a schema as defn metadata, which accepts any values as inpu (as I only one to validate output) How could this look like ?

respatialized22:10:08

assuming your function is 1-arity, you could do:

(defn my-func {:malli/schema [:=> [:cat :any] output-schema]}
  ... ; body goes here)

👍 1