This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-14
Channels
- # babashka (53)
- # beginners (158)
- # calva (25)
- # cider (21)
- # clara (1)
- # clj-kondo (12)
- # cljsrn (6)
- # clojure (94)
- # clojure-australia (2)
- # clojure-bay-area (6)
- # clojure-europe (40)
- # clojure-nl (10)
- # clojure-spec (16)
- # clojure-uk (18)
- # clojurescript (95)
- # cursive (14)
- # data-science (1)
- # datascript (6)
- # datomic (18)
- # depstar (2)
- # duct (36)
- # emacs (15)
- # events (4)
- # fulcro (16)
- # graalvm (10)
- # helix (25)
- # honeysql (6)
- # jackdaw (4)
- # jobs (2)
- # leiningen (24)
- # lsp (4)
- # malli (10)
- # off-topic (3)
- # pathom (3)
- # polylith (19)
- # practicalli (4)
- # prelude (1)
- # re-frame (6)
- # reagent (13)
- # reitit (3)
- # remote-jobs (10)
- # ring (12)
- # ring-swagger (2)
- # shadow-cljs (54)
- # testing (17)
- # tools-deps (10)
- # xtdb (14)
I was wondering, is there dedicated support in function schemas to handle things like (fn [a, b, & {:keys [c, d]})
I'd like to be able to do: (m/=> fn-name [:=> [:cat Foo, Bar, [:map?? [:c Baz] [:d Other]]]]
I don't think so
You could do [:cat Foo, Bar, [:* [:alt [:cat [:= :c] :any] [:cat [:= :d] :any]]]]
(permits duplicates, but so does the fn itself)
It would be good to have something more convenient especially with Clojure 1.11: https://clojure.org/news/2021/03/18/apis-serving-people-and-programs
Like [:cat Foo, Bar, [:alt [:* [:alt [:cat [:= :c] :any] [:cat [:= :d] :any]]] [:map [:c {:optional true} :any] [:d {:optional true} :any]]]
or something can handle the 1.11 feature as well but who likes to write it even once