title: Hash table in Racket
body: <p>I'm new to Racket and I'm trying to define a function <code>sort-mail</code> that is gonna sort a hash table.</p>
  
  <p>I've some defined lists:</p>
  
  <pre><code>(define test-dates
      '("Sun, 10 Sep 2017 09:48:44 +0200"
        "Wed, 13 Sep 2017 17:51:05 +0000"
        "Sun, 10 Sep 2017 13:16:19 +0200"
        "Tue, 17 Nov 2009 18:21:38 -0500"
        "Wed, 13 Sep 2017 10:40:47 -0700"
        "Thu, 14 Sep 2017 12:03:35 -0700"
        "Wed, 18 Nov 2009 02:22:12 -0800"
        "Sat, 09 Sep 2017 13:40:18 -0700"
        "Tue, 26 Oct 2010 15:11:06 +0200"
        "Tue, 17 Nov 2009 18:04:31 -0800"
        "Mon, 17 Oct 2011 04:15:12 +0000"
        "Sun, 16 Oct 2011 23:12:02 -0500"
        "Mon, 11 Sep 2017 14:41:12 +0100"))
  
     (define sorted-dates
      '("Tue, 17 Nov 2009 18:04:31 -0800"
        "Tue, 17 Nov 2009 18:21:38 -0500"
        "Wed, 18 Nov 2009 02:22:12 -0800"
        "Tue, 26 Oct 2010 15:11:06 +0200"
        "Sun, 16 Oct 2011 23:12:02 -0500"
        "Mon, 17 Oct 2011 04:15:12 +0000"
        "Sat, 09 Sep 2017 13:40:18 -0700"
        "Sun, 10 Sep 2017 09:48:44 +0200"
        "Sun, 10 Sep 2017 13:16:19 +0200"
        "Mon, 11 Sep 2017 14:41:12 +0100"
        "Wed, 13 Sep 2017 10:40:47 -0700"
        "Wed, 13 Sep 2017 17:51:05 +0000"
        "Thu, 14 Sep 2017 12:03:35 -0700"))
  </code></pre>
  
  <p>The function is supposed to pass this test. </p>
  
  <pre><code>(module+ test       
    (define test-hashes (map (lambda (x) (hasheq 'Date x)) test-dates))       
    (define sorted-hashes (map (lambda (x) (hasheq 'Date x)) sorted-dates))     
    (check-equal? (sort-mail test-hashes) sorted-hashes)) 
  </code></pre>
  
  <p>So, how do I even start? I find hash tables in Racket very difficult. I thought of using the <code>sort</code> function, but it guess it doesn't take a hash table as an argument. </p>