(defmacro ntimes (n &rest body) (let ((g (gensym)) (h (gensym))) `(let ((,h ,n)) (do ((,g 0 (+ ,g 1))) ((>= ,g ,h)) ,@body)))) (deftest test-macro () (check (equalp (format t ".....") (ntimes 5 (princ ".")))))