Playing with flow, I've been running into "this process is just a transducer" and wrote something like
(f/create-flow
{:procs {:odds {:proc (-> identity f/lift1->step f/process)
:chan-opts {:in {:buf-or-n 10 :xform (filter odd?)}}}}})
After a couple of times I easified that to
(f/create-flow
{:procs {:odds (xf-proc :xform (filter odd?))}})
with
(defn xf-proc [& {:keys [xform buf-or-n] :or {buf-or-n 10}}]
{:proc (-> identity f/lift1->step f/process)
:chan-opts {:in {:buf-or-n buf-or-n :xform xform}}})
Any reason not to do this / potential pitfalls with the general approach?Seems fine