This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-08
Channels
- # asami (7)
- # aws (2)
- # babashka (21)
- # beginners (602)
- # calva (8)
- # cider (11)
- # clj-kondo (10)
- # cljfx (1)
- # clojure (177)
- # clojure-europe (43)
- # clojure-nl (3)
- # clojure-taiwan (2)
- # clojure-uk (45)
- # clojurescript (31)
- # depstar (8)
- # figwheel-main (2)
- # fulcro (12)
- # hugsql (2)
- # java (1)
- # jobs (2)
- # meander (1)
- # missionary (1)
- # off-topic (67)
- # other-languages (1)
- # pathom (212)
- # polylith (4)
- # rdf (1)
- # re-frame (10)
- # reagent (12)
- # reitit (28)
- # reveal (3)
- # shadow-cljs (21)
- # spacemacs (7)
- # sql (5)
- # tools-deps (12)
- # vim (1)
I found a “problem” with defmethod
because defmethod expects & fn-tail
it is possible to set local binding for the function that implement that particular method. but clj-kondo give me an error for such case
@delaguardo Can you post this code as text instead of screenshot?
(require '[clojure.string :as string])
(defmulti example :tag)
(defmethod example :node
f
([] "NODE: ")
([{:keys [children]}]
(str (f) (string/join " " (map example children)))))
(defmethod example :leaf
f
([] "LEAF: ")
([{:keys [value]}]
(str (f) value)))
surethis is definitely an edge case which I never saw in real examples so I came here to check if this is something that should be addressed in clj-kondo.