From f2d20def80b8e5b6d6d1df506284d9893c48c494 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Tue, 26 Mar 2019 14:03:46 -0700 Subject: [PATCH] eek --- quad/quad/wrap.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quad/quad/wrap.rkt b/quad/quad/wrap.rkt index d759a9d8..4889c192 100644 --- a/quad/quad/wrap.rkt +++ b/quad/quad/wrap.rkt @@ -201,7 +201,7 @@ (define (wrap-pieces-best pieces-vec starting-wrap-idx previous-last-q wrap-count distance-func max-distance-proc finish-wrap) (define (penalty i j) (cond - [(or (= i j) (> j (vector-length pieces-vec))) + [(or (eq? i j) (> j (vector-length pieces-vec))) (define out-of-bounds-signal (- i)) (penalty-rec out-of-bounds-signal #f 0)] [else @@ -223,7 +223,7 @@ [(negative? underflow) ;; overfull line: huge penalty prevents break; multiplier is essential for monotonicity. (* mega-penalty (- underflow))] - [(let ([on-last-line? (= j (vector-length pieces-vec))]) + [(let ([on-last-line? (eq? j (vector-length pieces-vec))]) (or (not on-last-line?) (and on-last-line? (not last-line-can-be-short?)))) ;; standard penalty