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