This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-02
Channels
- # babashka (37)
- # beginners (19)
- # calva (5)
- # cider (14)
- # clojure (21)
- # clojure-europe (2)
- # clojurescript (16)
- # conjure (11)
- # datalog (77)
- # deps-new (3)
- # gratitude (2)
- # introduce-yourself (1)
- # joker (1)
- # jvm (4)
- # lsp (17)
- # malli (5)
- # meander (6)
- # minecraft (3)
- # off-topic (17)
- # other-languages (25)
- # practicalli (1)
- # quil (12)
- # reveal (6)
- # spacemacs (19)
Updating the README: pulling out function schemas from normal clojure functions:
(require '[malli.destructure :as md])
(def infer (comp :schema md/parse))
(defn kikka
([a] [a])
([a b & cs] [a b cs]))
(->> #'kikka
meta
:arglists
(map infer)
(map (fn [s] [:=> s :any]))
(into [:function]))
;[:function
; [:=> [:cat :any] :any]
; [:=> [:cat :any :any [:* :any]]
👏 1
could add a helper to enable that with malli.dev
so that one could auto-infer all/interesting Vars at dev-team to get pretty runtime errors + clj-kondo mappings for free too.
merged. Before jumping into the-next-thing-I-need, I’ll try to address all PRs. Really good stuff there 🙇
🎉 3
Regarding the string char ranges, @U02AH3D0HEV had a great idea for putting it in a lookup array, great perf
🙏 1