Created
January 18, 2017 16:25
-
-
Save jdkealy/b74e35083aad38428b2587d182bd6144 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
(let [c (chan)] | |
(go | |
(let [func (fn [] (>! c "callback"))] | |
(.toDataUrl js/window img (fn [res] | |
(swap! items #(conj % [res name])) | |
(swap! zips-atom #(-> % | |
(assoc-in [(:db/id item) :downloaded] (count @items)))) | |
(func) | |
(do-zip)))) | |
(let [res (<! c)] | |
(println res)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment