Skip to content

Commit

Permalink
Remove iteration clauses from LOOP body code
Browse files Browse the repository at this point in the history
While here, properly sharpquote CDDR in an intervening LOOP.
  • Loading branch information
paulapatience committed May 16, 2024
1 parent bbada6d commit b5cc7f7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions chazelle.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -763,9 +763,8 @@
(let ((gap nil)
;; bottom of vertical edge
(v1 (dll-prev v)))
(loop while (and (hv-n v)
(hv-q v))
for n = (hv-n v)
(loop for n = (hv-n v)
while (and n (hv-q v))
do (push (list (hv-y v)
(- (hv-y (hv-n v))
(hv-y v)))
Expand Down Expand Up @@ -1026,7 +1025,7 @@
(defun %make-hole-from-points (points)
;; points should be (x1 y1 x2 y2 ...), clockwise around hole
(make-hole
(loop for (x y) on points by 'cddr
(loop for (x y) on points by #'cddr
for v = (make-hole-vertex x y nil)
then (make-hole-vertex x y v)
finally (return v))))
Expand Down Expand Up @@ -1283,10 +1282,11 @@
(destructuring-bind (sl sr) (top1 q1)
(assert (= (y sl) (y sr)))
(loop while (not (deq-empty-p q))
for (ql qr) = (top2 q)
do (assert (= (y ql) (y qr)))
while (<=y ql sl)
do (pop2 q))))
do (destructuring-bind (ql qr) (top2 q)
(assert (= (y ql) (y qr)))
(unless (<=y ql sl)
(return))
(pop2 q)))))
(loop for x = (top1 q1)
until (deq-empty-p q1)
do (push2 x q)
Expand Down

0 comments on commit b5cc7f7

Please sign in to comment.