(defpackage "WHO-EXAMPLE" (:use "CL" "CL-WHO")) (in-package "WHO-EXAMPLE") (defvar *who-stream*) (defun some-snippet (content &optional (stream *who-stream*)) (with-html-output (stream) (:div :class "snippet" (esc content)))) (defun stuff () (with-html-output-to-string (*who-stream*) (:body (loop for i from 1 to 10 do (some-snippet (format nil "A snippet ~D" i)))))) ;; (stuff) => ;; "
A snippet 1
A snippet 2
A snippet 3
A snippet 4
A snippet 5
A snippet 6
A snippet 7
A snippet 8
A snippet 9
A snippet 10
"