Improve the explanation of hash->list/ordered.

This commit is contained in:
Sergiu Ivanov 2022-03-05 13:44:48 +01:00
parent 97d4c18305
commit fa940eb0d3
2 changed files with 3 additions and 3 deletions

View File

@ -359,8 +359,8 @@ Converts the values of a hash table from lists to sets.
Returns the key-value pairs of a given hash table in the order in which the
hash table orders them for @racket[hash-map].
@bold{TODO:} Remove after Racket 8.4, in which @racket[hash->list] gets a new
optional argument @racket[try-order?].
@bold{TODO:} Remove after Typed Racket has caught up with Racket 8.4, in which
@racket[hash->list] gets a new optional argument @racket[try-order?].
@examples[#:eval utils-evaluator
(hash->list/ordered #hash((b . 1) (a . 1)))

View File

@ -403,7 +403,7 @@
(check-equal? (ht-values/list->set #hash((a . (1 1))))
(hash 'a (set 1)))))
;; TODO: Remove after Racket 8.4.
;; TODO: Remove after Typed Racket has caught up with Racket 8.4.
(: hash->list/ordered (All (a b) (-> (HashTable a b) (Listof (Pairof a b)))))
(define (hash->list/ordered ht)
((inst hash-map a b (Pairof a b)) ht cons #t))