Skip to content

Commit 3088b60

Browse files
resyntax-ci[bot]samth
authored andcommitted
Fix 2 occurrences of sort-with-keyed-comparator-to-sort-by-key
This `sort` expression can be replaced with a simpler, equivalent expression.
1 parent a0e9072 commit 3088b60

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

typed-racket-lib/typed-racket/rep/prop-rep.rkt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@
143143
[#:for-each (f) (for-each f ps)]
144144
[#:custom-constructor/contract
145145
(-> (listof (or/c TypeProp? NotTypeProp? LeqProp?)) OrProp?)
146-
(let ([ps (sort ps (λ (p q) (unsafe-fx<= (eq-hash-code p)
147-
(eq-hash-code q))))])
146+
(let ([ps (sort ps unsafe-fx<= #:key eq-hash-code)])
148147
(intern-single-ref!
149148
orprop-intern-table
150149
ps

typed-racket-lib/typed-racket/rep/type-rep.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1813,7 +1813,7 @@
18131813

18141814
;; sorts the given field of a Row by the member name
18151815
(define (sort-row-clauses clauses)
1816-
(sort clauses (λ (x y) (symbol<? (car x) (car y)))))
1816+
(sort clauses symbol<? #:key car))
18171817

18181818
(define-match-expander Class:*
18191819
(λ (stx)

0 commit comments

Comments
 (0)