Hi Sam,
Transducers are a new feature, and best practices are still emerging.
Transducing/reducing is always non-lazy, so it's *less* risky to have side
effects in a reduce compared with side effects in a lazy sequence.
Still, I would offer the same advice I give for lazy sequences. Keep your
This seems bad, is this bad:
(defn to-db
[conn]
(fn
([val] (upload-to-my-db conn val))
([_ val] (upload-to-my-db conn val)))
(defn -main []
(transduce my-preprocessing-xf (to-db (get-db-conn)) seq-of-things-to-
preprocess-and-upload))
I ask only because
1) Plugging the side-effec