This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-24
Channels
- # arachne (1)
- # aws (1)
- # beginners (43)
- # boot (67)
- # cider (7)
- # cljs-dev (14)
- # cljsjs (6)
- # clojure (215)
- # clojure-czech (2)
- # clojure-dev (12)
- # clojure-dusseldorf (2)
- # clojure-italy (1)
- # clojure-russia (22)
- # clojure-spec (2)
- # clojure-uk (33)
- # clojurescript (85)
- # cryogen (2)
- # cursive (1)
- # datascript (22)
- # datomic (18)
- # dirac (8)
- # hoplon (9)
- # klipse (1)
- # lein-figwheel (5)
- # leiningen (126)
- # off-topic (1)
- # om (57)
- # onyx (159)
- # pedestal (33)
- # planck (2)
- # re-frame (52)
- # reagent (3)
- # ring (2)
- # ring-swagger (16)
- # test-check (12)
- # testing (5)
- # untangled (86)
- # vim (6)
is it working as intended that extend of a protocol function on a record (not inline) resets all other functions in that protocol for that type?
(defprotocol IFoo (a [x] ) (b [x] ))
(defrecord Foo [])
(extend-protocol IFoo Foo (a [x] "A") (b [x] "B"))
(def foo (Foo.))
(extend-protocol IFoo Foo (b [x] "BB"))
(a foo) => CompilerException java.lang.RuntimeException: Unable to resolve symbol: a in this context
(b foo) => "BB"
I know I can just split that into diff protocols, but in that particular case that's 20 protos ...
yeah, just meant that currently the extend-protocol
overrides the whole type every time it's called
well the word "extend" meant something else for me, but anyway, I ll find a workaround
yes, it’s supposed to work that way