Created
April 4, 2013 16:00
-
-
Save joekarma/5311681 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; cl-who | |
(let ((colors '("red" "green" "blue"))) | |
(who:with-html-output-to-string (s) | |
(:html | |
(:head | |
(:title "Colors")) | |
(:body | |
(:ul | |
(dolist (c colors) | |
(who:htm (:li (who:str c))))))))) | |
;; yaclml | |
(let ((colors '("red" "green" "blue"))) | |
(yaclml:with-yaclml-output-to-string | |
(<:html | |
(<:head | |
(<:title "Colors")) | |
(<:body | |
(<:ul | |
(dolist (c colors) | |
(<:li (<:as-html c)))))))) | |
;; yaclml makes it easier to move snippets to functions | |
;; It can also do this while preserving indentation, if that's important to you. | |
(let ((colors '("red" "green" "blue"))) | |
(yaclml:with-yaclml-output-to-string | |
(<:html | |
(<:head | |
(<:title "Colors")) | |
(<:body | |
(<:ul | |
(dolist (c colors) | |
(yaclml-list-item c))))))) | |
(defun yaclml-list-item (c) | |
(<:li :class "foo" | |
(<:ah c))) |
jasom
commented
Apr 4, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment