From b8acee56552946e4ce4da3eee1d4935e60310478 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 12 Sep 2012 15:40:52 -0500 Subject: [PATCH] small cleanup --- collects/redex/private/core-layout.rkt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/collects/redex/private/core-layout.rkt b/collects/redex/private/core-layout.rkt index 326cd06a9d..9f946da119 100644 --- a/collects/redex/private/core-layout.rkt +++ b/collects/redex/private/core-layout.rkt @@ -340,7 +340,7 @@ 0))]) (cond [(and after-next-lw (null? to-wrap)) - (list* next-lw (loop after-next-lw next-line next-column))] + (cons next-lw (loop after-next-lw next-line next-column))] [(and (not after-next-lw) (null? to-wrap)) '()] [else @@ -443,10 +443,9 @@ (set! gobbled-lines (+ gobbled-lines lines-to-end))] [else ;; insert a bunch of blank lines - (for-each - (λ (i) - (set! lines (cons (make-line (+ (- current-line gobbled-lines) i) '()) lines))) - (build-list (- lines-to-end 1) add1))]) + (for/list ([i (in-range 1 lines-to-end)]) + (define new-line (make-line (+ (- current-line gobbled-lines) i) '())) + (set! lines (cons new-line lines)))]) (set! tokens (cons (make-spacer-token 0 (- col initial-column))