File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
typed-racket-lib/typed-racket/types Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 3131 ;; the kw protocol puts the arguments in keyword-sorted order in the
3232 ;; function header, so we need to sort the types to match
3333 (define sorted-kws
34- (sort keywords (λ (kw1 kw2) (keyword<? (Keyword-kw kw1)
35- (Keyword-kw kw2)))))
34+ (sort keywords keyword<? #:key Keyword-kw))
3635
3736 (define pos-opt-arg-types
3837 (append (for/list ([t (in-list optional-arg-types)]
148147(define (calculate-mandatory-args orig-arrows)
149148 ;; sorted order is important, our loops below rely on this order
150149 (define arity-sorted-arrows
151- (sort orig-arrows
152- (λ (a1 a2) (>= (Arrow-max-arity a1)
153- (Arrow-max-arity a2)))))
150+ (sort orig-arrows >= #:key Arrow-max-arity))
154151 (for/fold ([mand-arg-table '() ])
155152 ([arrow (in-list arity-sorted-arrows)])
156153 (cond
Original file line number Diff line number Diff line change 379379 [(AndProp: ps*) (partition! ps*)]
380380 [_ (set! others (cons p others))])))
381381 (define ors-smallest-to-largest
382- (append-map cdr (sort (hash->list ors)
383- (λ (len/ors1 len/ors2)
384- (< (car len/ors1) (car len/ors2))))))
382+ (append-map cdr (sort (hash->list ors) < #:key car)))
385383 (remove-duplicates (append ts nts others ors-smallest-to-largest) eq?))
386384 (let loop ([ps (flatten-ands/remove-duplicates/order args)]
387385 [result null])
You can’t perform that action at this time.
0 commit comments