3 ms·
In Clojure (hiccup), the idea is similar (lists for HTML) but with a nicer syntax. Comparing it, how does this seem as an alternative? [:html [:head [
by diggan 5y ago
In Clojure (hiccup), the idea is similar (lists for HTML) but with a nicer syntax. Comparing it, how does this seem as an alternative?
[:html
[:head [:title "A simple Hello world example"]]
[:body [:div "Hello World"]]]
It's simply lists inside lists, with keywords (:html) being converted to HTML elements, and second (and the rest) item/s being children of whatever came as the first keyword in the list.