Created
July 24, 2019 17:28
-
-
Save rbnpercy/303bb353acd1459225be744a701b4a6c 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
(ns async-example.core | |
(:require [clojure.core.async :refer :all]) | |
(:gen-class)) | |
(defn -main [& args] | |
(doseq [i (range 10)] | |
(go | |
(Thread/sleep (rand-int 1000)) | |
(println i))) | |
(Thread/sleep 2000)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment