Skip to content

Commit 924ff4a

Browse files
Fix 1 occurrence of apply-append-for-loop-to-for-loop
Instead of using `(apply append ...)` to flatten a list of lists, consider using `for*/list` to flatten the list.
1 parent 4c4c7ec commit 924ff4a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

typed-racket-lib/typed-racket/types/printer.rkt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,9 @@
458458
(define-values (pre mid) (split-at lst to-drop))
459459
(define-values (sub post) (split-at mid n))
460460
(list pre sub post)))
461-
(apply append (for/list ([i (range (length lst) 0 -1)])
462-
(sublist-n i lst))))
461+
(for*/list ([i (range (length lst) 0 -1)]
462+
[v (in-list (sublist-n i lst))])
463+
v))
463464
(let loop ([left-to-cover arrs])
464465
;; try to match the largest sublists possible that correspond to
465466
;; ->* types and then the remainder are formatted normally

0 commit comments

Comments
 (0)