(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