From f0ac9223e42625d7078db3dfef311c4c9ef7f405 Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Sat, 21 Mar 2020 19:23:30 +0100 Subject: [PATCH] utils: Don't forget hash->list/ordered (the tests were broken). --- utils.rkt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils.rkt b/utils.rkt index 2ef33f3..53eb1c9 100644 --- a/utils.rkt +++ b/utils.rkt @@ -329,6 +329,10 @@ (for/hash ([(k v) (in-hash ht)]) (values k (list->set v)))) +;;; Returns the key-value pairs of a given hash table in the order in +;;; which the hash table orders them for hash-map and hash-for-each. +(define (hash->list/ordered ht) (hash-map ht cons #t)) + ;;; ========= ;;; Functions