anchor.diff:  (load "points.lisp")
   
  +(declaim (optimize (debug 3)))
  +
  +;; Array index convention:
  +;;  0,0        0,x
  +;;     +------->
  +;;     |
  +;;     |
  +;;     |
  +;; y,0 v        y,x
  +
  +
  +;; walk-midpoints calls point-function on all midpoints of squares by
  +;; starting at a midpoint origin (which the caller supplies, this
  +;; function knows nothing of the array being worked on). From there it
  +;; "hops" along rows and columns, and visits every midpoint once.
   (defun walk-midpoints (origin stepsize times point-function)
     (do ((y (py origin) (+ y stepsize))
          (current-line 0 (1+ current-line)))
  
positive.code:     (do ((x (px origin) (+ x stepsize)) 
  	 (current-column 0 (1+ current-column)))
  	((> current-column times))
        (funcall point-function x y)))) ; point-function gets the array from
                                        ; a scope outside of theis function.
  
  ;; set-points generates a size*size array of zeros and walks over the
  ;; midpoints of the diamind-square algorithm. The array arr (which
  ;; must be of a size 2^n+1) can be subdivided log(n) times. For each
  ;; subdivision walk-midpoints is called, which calls an anonymous
  ;; function on every midpoint. This function can manipulate arr, since
  ;; it is created within the let-block where arr is created. 
  
  (defun set-points (size)
    (let ((arr (make-array (list size size) :initial-element 0)))
  
negative.code: 	 (times 0 (1+ times))
  	 (index 1 (1+ index)))
  	((>= times (floor (log size 2))))
        (walk-midpoints midpoint stepsize (1- (expt 2 times))
  		      (lambda (x y stepsize)
  			(progn
  			  (format t "Working on point (~a, ~a)~%" y x)
  			  (diamond-step y x stepsize 5 arr)
  			  (square-step y x stepsize 5 arr))))
        (if (= 0 #2=(floor (/ (car midpoint) 2)))
  	  (setf midpoint (cons 1 1))
  	  (setf midpoint (cons #2# #2#))))
      arr))(declaim (optimize (debug 3)))