This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-01
Channels
- # announcements (5)
- # aws (2)
- # babashka (35)
- # beginners (68)
- # bristol-clojurians (1)
- # calva (14)
- # cider (9)
- # clj-commons (5)
- # clojars (3)
- # clojure (101)
- # clojure-australia (6)
- # clojure-europe (35)
- # clojure-italy (2)
- # clojure-nl (5)
- # clojure-spec (1)
- # clojure-uk (4)
- # clojurescript (70)
- # conjure (3)
- # cursive (7)
- # datomic (36)
- # emacs (11)
- # exercism (1)
- # fulcro (23)
- # helix (2)
- # jobs-discuss (15)
- # lsp (17)
- # malli (8)
- # meander (1)
- # nrepl (60)
- # off-topic (10)
- # pedestal (9)
- # react (8)
- # reagent (53)
- # reveal (10)
- # shadow-cljs (27)
- # spacemacs (4)
- # tools-build (4)
- # tools-deps (4)
- # xtdb (2)
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.
e.g. wrap the :ref
inside a :schema forcing it out of the secuence to it's own schema.
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 ?
assuming your function is 1-arity, you could do:
(defn my-func {:malli/schema [:=> [:cat :any] output-schema]}
... ; body goes here)
👍 1