Skip to content

Commit 0977dc2

Browse files
resyntax-ci[bot]rfindler
authored andcommitted
Fix 2 occurrences of for-each-to-for
This `for-each` operation can be replaced with a `for` loop.
1 parent b6a702f commit 0977dc2

1 file changed

Lines changed: 19 additions & 21 deletions

File tree

drracket-core-lib/drracket/private/syncheck-debug.rkt

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -76,22 +76,21 @@
7676
(and (syntax? origin) (syntax->datum origin)))]
7777
[else (void)])))
7878

79-
(for-each (λ (range)
80-
(let* ([obj (car range)]
81-
[stx (hash-ref stx-ht obj)]
82-
[start (cadr range)]
83-
[end (cddr range)])
84-
(when (syntax? stx)
85-
(send output-text set-clickback
86-
start
87-
end
88-
(λ _
89-
(send info-text begin-edit-sequence)
90-
(send info-text erase)
91-
(show-info stx)
92-
(make-modern info-text)
93-
(send info-text end-edit-sequence))))))
94-
ranges)
79+
(for ([range (in-list ranges)])
80+
(define obj (car range))
81+
(define stx (hash-ref stx-ht obj))
82+
(define start (cadr range))
83+
(define end (cddr range))
84+
(when (syntax? stx)
85+
(send output-text set-clickback
86+
start
87+
end
88+
(λ _
89+
(send info-text begin-edit-sequence)
90+
(send info-text erase)
91+
(show-info stx)
92+
(make-modern info-text)
93+
(send info-text end-edit-sequence)))))
9594

9695
(newline output-port)
9796
(newline output-port)
@@ -103,11 +102,10 @@
103102
(λ _
104103
(send info-text begin-edit-sequence)
105104
(send info-text erase)
106-
(for-each (λ (rng)
107-
(let ([stx (hash-ref stx-ht (car rng))])
108-
(when (syntax? stx)
109-
(show-info stx))))
110-
ranges)
105+
(for ([rng (in-list ranges)])
106+
(define stx (hash-ref stx-ht (car rng)))
107+
(when (syntax? stx)
108+
(show-info stx)))
111109
(make-modern info-text)
112110
(send info-text end-edit-sequence))))
113111

0 commit comments

Comments
 (0)