Skip to content

Instantly share code, notes, and snippets.

View rschwarz's full-sized avatar

Robert Schwarz rschwarz

View GitHub Profile
@rschwarz
rschwarz / gist:2ba2c863b027a35ce3f22268074df611
Created February 28, 2018 14:18 — forked from bayan/gist:3382884
Clojure DSL to generate static HTML
;; Generating static HTML using Clojure macros
;; It is possible to write a DSL in Clojure that generates HTML markup without the need to write a separate parser and compiler (e.g. HAML).
;; Our aim here would be to write code that converts the following Clojure code into the HTML below it
;; (html
;; (head)
;; (body
;; (h1 "An example")