Created
September 2, 2014 22:03
-
-
Save martinklepsch/f5f70ea5b6568cc2a1de 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
(def report-chan (chan 10)) | |
(def upload-files (comp (map #(upload-file % report-chan)))) | |
(def upload-chan (chan 10 upload-files)) | |
(def sign-files (comp (map #(sign-file % upload-chan)))) | |
(def signing-chan (chan 10 sign-files)) | |
(def test-file | |
(first (array-seq (.-files (gdom/getElement "fin"))))) | |
(put! signing-chan test-file) | |
(go (while true | |
(let [[v ch] (alts! [signing-chan upload-chan report-chan])] | |
(if (= ch result-chan) | |
(log v))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment