Skip to content

Commit c09b9ba

Browse files
resyntax-ci[bot]rfindler
authored andcommitted
Fix 1 occurrence of named-let-loop-to-for/first-in-naturals
This named `let` expression can be replaced by a simpler, equivalent `for/first` loop.
1 parent 425aa8e commit c09b9ba

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

drracket/help/private/save-bug-report.rkt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,9 @@
8989
(λ (bug-reports)
9090
(define ids (map saved-report-id bug-reports))
9191
(define new-id
92-
(let loop ([i 0])
93-
(cond
94-
[(member i ids)
95-
(loop (+ i 1))]
96-
[else
97-
i])))
92+
(for/first ([i (in-naturals 0)]
93+
#:unless (member i ids))
94+
i))
9895
(set! ans (blank-bug-form new-id))
9996
(cons ans bug-reports)))
10097
ans)

0 commit comments

Comments
 (0)