Skip to content

Instantly share code, notes, and snippets.

@micha
Last active July 4, 2016 01:29
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 micha/1da04dbfd027402c74b69348792b3453 to your computer and use it in GitHub Desktop.
Save micha/1da04dbfd027402c74b69348792b3453 to your computer and use it in GitHub Desktop.
(ns+ foop2.core
(:gen-html "index.html")
(:use [javelin.core])
(:require [hoplon.core :as h]))
(defc bottles 99)
(h/body
(h/button :click #(swap! bottles dec)
:disabled (cell= (not (pos? bottles)))
:text (cell= (if (pos? bottles)
(str bottles " bottles of beer on the wall")
"go home, you're drunk"))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment