This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-13
Channels
- # beginners (17)
- # boot (16)
- # cider (13)
- # cljs-dev (26)
- # cljsrn (5)
- # clojure (155)
- # clojure-belgium (2)
- # clojure-spec (19)
- # clojure-uk (4)
- # clojurescript (32)
- # community-development (16)
- # core-async (12)
- # cursive (3)
- # datomic (7)
- # hoplon (14)
- # lambdaisland (1)
- # lumo (16)
- # microservices (1)
- # off-topic (3)
- # om (5)
- # onyx (4)
- # protorepl (1)
- # re-frame (1)
- # rum (1)
- # specter (6)
- # unrepl (32)
Is there a way to implement NONE removal for walker? There are a lot of types of entities in the db and they all use the same flag for signifying something as inactive.
Also, the inactive entities always appear in vectors. Would it make sense to wrap the setval above in a transform that would filter each vector to remove NONE?
@ksmithbaylor i don't think it would be too hard to re-implement walker in terms of recursive-path
, ALL
, etc.
you could also use [(walker vector?) ALL (pred :inactive)]
as your path, and NONE
removal will work
actually that would need to be wrapped in recursive-path
so it reaches vectors nested inside maps inside vectors
Since I'm fairly new to Clojure, I'm not quite clear on the usage of recursive-path
. Here's what I have so far, but it seems to have no effect on the data:
(setval (recursive-path [] p [(walker vector?) ALL (pred :inactive) p]) NONE data)