Skip to content

Instantly share code, notes, and snippets.

@yuanmai
Created January 6, 2013 07:08
Show Gist options
  • Save yuanmai/4465770 to your computer and use it in GitHub Desktop.
Save yuanmai/4465770 to your computer and use it in GitHub Desktop.
enlive fragment
{[:input] [:label]}
(h/clone-for [[k v] (:choices q)]
[:input]
(h/set-attr :name (-> q :question-id name)
:id (name k)
:value (name k))
[:label]
(h/do->
(h/set-attr :for (name k))
(h/content (str (name k) ": " v)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment