Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

ACONDTIMES

Name: Anonymous 2010-10-01 20:40

How do you like my new macro?

(defmacro acondtimes ((var count) test &body then)
  (if (plusp count)
      (let ((sym (gensym)))
        `(let* ((,var ,count)
                (,sym ,test))
           (if ,sym
               (let ((it ,sym)) ,@then)
               (acondtimes (,var ,(1- count)) ,test ,@then))))
      nil))


Hardly tested; rude bug reports expected.

Name: Anonymous 2010-10-02 18:50

>>9
the ``it'' symbol?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List