Skip to content

Instantly share code, notes, and snippets.

@viebel
Last active November 14, 2016 17:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save viebel/820f672dd176169fd831c7748e6f3cd3 to your computer and use it in GitHub Desktop.
Save viebel/820f672dd176169fd831c7748e6f3cd3 to your computer and use it in GitHub Desktop.
(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