Created
August 11, 2017 09:38
-
-
Save jasonneylon/869a2e81ae457a52af285ade237324ae to your computer and use it in GitHub Desktop.
This file contains hidden or 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 timeout [ms] | |
(let [c (chan)] | |
(js/setTimeout (fn [] (close! c)) ms) | |
c)) | |
(defn run-kmean | |
[] | |
(go | |
(dotimes [iteration 10] | |
(<! (timeout 1000)) | |
(swap! app-state update-kmean) | |
... | |
))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment