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

/prog/,

Name: why doesn't 2007-12-16 1:09

this damn thing work?

(defmacro dosquare (filled (var1 count1) (var2 count2) &body body)
  (if filled
      `(dotimes (,var1 ,count1)
         (dotimes (,var2 ,count2)
           ,@body))
      `(progn
         (dotimes (,var1 ,count1)
           (let ((,var2 0))
             ,@body)
           (let ((,var2 ,(1- count2)))
             ,@body))
         (dotimes (,var2 ,count2)
           (let ((,var1 0))
             ,@body)
           (let ((,var1 ,(1- count1)))
             ,@body)))))

Name: Anonymous 2007-12-16 15:00

>>7
How you expect a programmer to use this? There's no way to refer to the values it iterates over from within the body.

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