Skip to content

Commit c14115c

Browse files
resyntax-ci[bot]samth
authored andcommitted
Fix 1 occurrence of for/fold-with-conditional-body-to-when-keyword
This `for/fold` loop can be simplified by using the `#:when` keyword.
1 parent bde87b8 commit c14115c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

typed-racket-lib/typed-racket/private/shallow-rewrite.rkt

+4-4
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,10 @@
316316
formals
317317
args)]))
318318
(define dom+
319-
(for/fold ([acc '()]) ([dom (in-list dom*)])
320-
(if (pair? dom)
321-
(cons (cdr dom) acc)
322-
acc)))
319+
(for/fold ([acc '()])
320+
([dom (in-list dom*)]
321+
#:when (pair? dom))
322+
(cons (cdr dom) acc)))
323323
(define check* (protect-loop rst dom+))
324324
(define fst-ty
325325
(if (type-annotation fst #:infer #f)

0 commit comments

Comments
 (0)