This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-12-18
Channels
- # adventofcode (9)
- # alda (2)
- # babashka (89)
- # beginners (86)
- # bristol-clojurians (1)
- # calva (54)
- # chestnut (2)
- # cider (18)
- # clj-kondo (19)
- # clojure (160)
- # clojure-brasil (2)
- # clojure-europe (6)
- # clojure-italy (8)
- # clojure-nl (46)
- # clojure-spec (52)
- # clojure-uk (45)
- # clojured (4)
- # clojuredesign-podcast (11)
- # clojurescript (15)
- # core-async (50)
- # datomic (41)
- # devops (3)
- # emacs (10)
- # fulcro (95)
- # graalvm (11)
- # graphql (3)
- # kaocha (1)
- # luminus (1)
- # malli (4)
- # off-topic (13)
- # overtone (3)
- # pathom (8)
- # re-frame (13)
- # reitit (10)
- # shadow-cljs (83)
- # spacemacs (2)
- # specter (9)
- # tools-deps (3)
- # vim (2)
hm here;’s a question, let’s say you have a predicate that will, given 2 values (key and value) tell you if you need to remove this map entry, how would you transform a map to drop those entries
I tried `
[(collect-one MAP-KEYS) MAP-VALS]
but that doesn’t work since collect-one’s select must return a single value
@roklenarcic the pattern for that is (setval [ALL (fn [[k v]] ...)] NONE my-map)
so any function can act as predicate in path? What’s the difference between that and using pred
a function in a path implicitly uses pred
you can use pred
manually for something like (pred :a)
:a
by itself would navigate to :a
, whereas (pred :a)
would filter based on the value of :a
ok thank you