Skip to content

Instantly share code, notes, and snippets.

@alandipert
Created August 6, 2014 14:56
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 alandipert/b6f0172c4af18639fc79 to your computer and use it in GitHub Desktop.
Save alandipert/b6f0172c4af18639fc79 to your computer and use it in GitHub Desktop.
(page "index.html")
(defc c1 10)
(defc c2 20)
(defc c3 30)
(defn inc-c1c2! [also]
(dosync
(also)
(swap! c1 inc)
(swap! c2 inc)))
(defn inc-c2c3! []
(dosync
(swap! c2 inc)
(swap! c3 inc)))
(cell= (print c1 c2 c3))
;;; => 10 20 30
(inc-c1c2! inc-c2c3!)
;;; => 11 22 31
(html
(head
(link :rel "stylesheet" :type "text/css" :href "css/main.css"))
(body (h1 "hi")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment