A geeky interlude

Just wrote this in Lisp:

(defmacro dotimes-nested ((&rest vars) &body body)
  (if (null vars)
      `(progn ,@body)
      `(dotimes (,(caar vars) ,(cadar vars))
        (dotimes-nested ,(cdr vars)
          ,@body))))

I think I’m in love.

No comments

No comments yet. Be the first.

Leave a reply