Last active
December 16, 2018 14:07
-
-
Save grav/a8bb76f1a6be9566fe2cc320a3bdb2e8 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 sleep [s] | |
(js/Promise. (fn [res rej] | |
(js/setTimeout res (* 1000 s))))) | |
(defn start [] | |
(println "while start") | |
(-> (sleep 2) | |
(.then start))) | |
(start) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment