Created
December 6, 2017 15:44
-
-
Save gszeliga/7228287b4812d9e573228fa12912888b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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