specter

Latest version: 1.1.3
nathanmarz 2018-03-20T01:07:19.000196Z

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

nathanmarz 2018-03-20T01:07:38.000334Z

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

nathanmarz 2018-03-20T01:08:29.000079Z

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}))

phreed 2018-03-20T14:16:33.000885Z

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?

nathanmarz 2018-03-20T14:30:45.000362Z

@phreed transducers operate over collections

nathanmarz 2018-03-20T14:32:04.000460Z

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