Last active
November 14, 2016 17:12
-
-
Save viebel/820f672dd176169fd831c7748e6f3cd3 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 viebel.color-loop | |
(:require-macros | |
[cljs.core.async.macros :refer [go-loop]]) | |
(:require | |
[cljs.core.async :refer [timeout <!]] | |
[viebel.gist-3800b8ebae5292921c7d6fcb6c995c1f.raw.body-color :refer [set-bg-color]])) | |
(def colors ["red" "yellow" "magenta" "blue" "green"]) | |
(go-loop [] | |
(set-bg-color (rand-nth colors)) | |
(<! (timeout 2000)) | |
(recur)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment