Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@martinklepsch
Created September 2, 2014 22:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martinklepsch/f5f70ea5b6568cc2a1de to your computer and use it in GitHub Desktop.
Save martinklepsch/f5f70ea5b6568cc2a1de to your computer and use it in GitHub Desktop.
(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