This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-14
Channels
- # aleph (16)
- # bangalore-clj (4)
- # beginners (19)
- # boot (27)
- # cider (81)
- # clara (2)
- # cljs-dev (343)
- # cljsrn (97)
- # clojure (224)
- # clojure-hk (1)
- # clojure-italy (25)
- # clojure-russia (5)
- # clojure-serbia (2)
- # clojure-spec (7)
- # clojure-uk (27)
- # clojurescript (97)
- # cursive (8)
- # datomic (48)
- # docker (1)
- # emacs (15)
- # hoplon (39)
- # jobs (4)
- # lumo (13)
- # off-topic (2)
- # om (66)
- # onyx (7)
- # parinfer (5)
- # pedestal (2)
- # play-clj (10)
- # protorepl (2)
- # quil (1)
- # re-frame (38)
- # reagent (33)
- # spacemacs (1)
- # specter (4)
- # sql (19)
- # test-check (31)
- # unrepl (4)
- # untangled (3)
I’m using specter in Clojurescript. I have a form that uses specter to remove a row from a deeply nested map. When I call the form from the repl, it works fine. When I run it from the browser, core.cljs?rel=1495975558928:89 Error: No protocol method IAssociative.-assoc defined for type cljs.core/LazySeq:.....
I’d really like to get Specter working in Clojurescript, as it will make my code much more manageable.
Here is the form:
(defn delete-row
[db row-nbr]
(->> db
(sp/transform [:db (:active (:db db)) :blocks
(sp/if-path #(< 1 (count %)) (sp/keypath row-nbr))]
sp/NONE)
(sp/setval [:db (:active (:db db)) :blocks nil?]
sp/NONE)))
@frankmoyer which line is failing, the transform or the setval?
also, what is (:active (:db db))
?
that returns a navigator?