(defun publish (parts)
(iterate
(with state = nil)
(for p in parts)
(setf (output-file p) (strcat (make-anchor-name (text (first parts))) ".html"))
(etypecase p
(comment-part (setf state (write-comment p state)))
(whitespace-part (setf state nil) (<:as-html (text p)))
(code-part (setf state (write-code p state))))))
Source Context