Skip to content

Instantly share code, notes, and snippets.

@gszeliga
Created December 6, 2017 15:44
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save gszeliga/7228287b4812d9e573228fa12912888b to your computer and use it in GitHub Desktop.
(defn process! [path fname npar]
(let [lines (mult (stream-lines-from path))
aggregate-tap (tap lines (chan 1024))
count-tap (tap lines (chan 1024))]
(<!! (async/reduce
(fn [_ v] (println v))
""
(async/merge [(aggregate-field fname aggregate-tap npar)
(count-lines count-tap npar)])))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment