Skip to content

Commit 47eefa5

Browse files
Fix 1 occurrence of for/fold-with-conditional-body-to-unless-keyword
This `for/fold` loop can be simplified by using the `#:unless` keyword.
1 parent 57d4987 commit 47eefa5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

typed-racket-lib/typed-racket/private/parse-type.rkt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1507,10 +1507,9 @@
15071507
;; Merge all the non-duplicate entries from the parent types
15081508
(define (merge-clause parent-clause clause)
15091509
(for/fold ([clause clause])
1510-
([(k v) (in-dict parent-clause)])
1511-
(if (dict-has-key? clause k)
1512-
clause
1513-
(dict-set clause k v))))
1510+
([(k v) (in-dict parent-clause)]
1511+
#:unless (dict-has-key? clause k))
1512+
(dict-set clause k v)))
15141513

15151514
(define (match-parent-type parent-type)
15161515
(define resolved (resolve parent-type))

0 commit comments

Comments
 (0)