Fork me on GitHub
#specter
<
2018-03-20
>
nathanmarz01:03:19

@phreed traverse-all is for integrating specter with transducers, which is not what you want in this case

nathanmarz01:03:38

that can just be done with select: (select [:foo ALL :bar] {:foo [{:bar "one" :baz "two"} {:bar "three" :biz "four"} ] :bing 5})

nathanmarz01:03:29

traverse is useful when you want a non-vector data structure back without materializing any intermediate data structure, e.g.:

(into #{} (traverse [:foo ALL :bar] {:foo [{:bar "one" :baz "two"} {:bar "three" :biz "four"} ] :bing 5}))

phreed14:03:33

Actually I do want to integrate with other transducers, the example I gave is contrived. I guess the issue is what does it mean to take a step with a single record?

nathanmarz14:03:45

@phreed transducers operate over collections

nathanmarz14:03:04

if you show a more complete example of your use case would be easier to help