Skip to content

Commit a0e9072

Browse files
resyntax-ci[bot]samth
authored andcommitted
Fix 1 occurrence of map-to-for
This `map` operation can be replaced with a `for/list` loop.
1 parent 64025c9 commit a0e9072

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

typed-racket-lib/typed-racket/typecheck/tc-structs.rkt

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -511,28 +511,29 @@
511511
(match ty
512512
[(Fun: (list arrs ...))
513513
(make-Fun
514-
(map (lambda (arr)
515-
(Arrow-update
516-
arr
517-
dom
518-
(lambda (doms)
519-
(match (car doms)
520-
[(Name/simple: n)
521-
#:when (free-identifier=? n st-name)
522-
(void)]
523-
[(App: (Name/simple: rator) vars)
524-
#:when (free-identifier=? rator st-name)
525-
(void)]
526-
[(Univ:)
527-
(void)]
528-
[(or (Name/simple: (app syntax-e n)) n)
529-
(tc-error/fields "type mismatch in the first parameter of the function for prop:procedure"
530-
"expected" (syntax-e st-name)
531-
"got" n
532-
#:stx (st-proc-ty-property #'ty-stx))])
533-
534-
(cdr doms))))
535-
arrs))]
514+
(for/list ([arr (in-list arrs)])
515+
(Arrow-update
516+
arr
517+
dom
518+
(lambda (doms)
519+
(match (car doms)
520+
[(Name/simple: n)
521+
#:when (free-identifier=? n st-name)
522+
(void)]
523+
[(App: (Name/simple: rator) vars)
524+
#:when (free-identifier=? rator st-name)
525+
(void)]
526+
[(Univ:) (void)]
527+
[(or (Name/simple: (app syntax-e n)) n)
528+
(tc-error/fields
529+
"type mismatch in the first parameter of the function for prop:procedure"
530+
"expected"
531+
(syntax-e st-name)
532+
"got"
533+
n
534+
#:stx (st-proc-ty-property #'ty-stx))])
535+
536+
(cdr doms)))))]
536537
[_
537538
(tc-error/fields "type mismatch"
538539
"expected"

0 commit comments

Comments
 (0)