Skip to content

Instantly share code, notes, and snippets.

@devn
Created April 1, 2010 13:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save devn/351781 to your computer and use it in GitHub Desktop.
Save devn/351781 to your computer and use it in GitHub Desktop.
(defhtml application [text body]
[:html
[:head
[:title text]]
[:body
[:h3 text]
body]])
(defhtml code-list [body]
[:ul body])
(defhtml code-block [[code result]]
[:li [:pre code] [:pre ";; =&gt" result]])
(defn test-fn*
[#^String text]
(response
(application text
(code-list (code-block text)))))
;; not working (yet)
(def test-web
(app
["examples" [text #".*"]]
{:get test-fn*}
[#".*"] {:get ["all routes!"]}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment