Fork me on GitHub
#specter
<
2017-12-07
>
mbertheau13:12:11

How would I do (filterv #(-> % :id nil?) foo) with specter? Or would I not?

nathanmarz13:12:10

@mbertheau two approaches:

(select [ALL #(-> % :id nil?)] foo)

nathanmarz13:12:25

(setval [ALL #(-> % :id some?)] NONE foo)

nathanmarz13:12:39

the first always returns a vector, the second maintains the type of whatever foo is

mbertheau14:12:50

@nathanmarz I'm just starting out with specter - thanks for helping me up the initial learning curve!

nathanmarz14:12:44

sure, no problem