title: Sort a list of pairs using sort Haskell
body: <p>I have a function (frequency) which that counts how many times each distinct value in a list occurs in that list. For example,</p>
  
  <pre><code>frequency "ababca" 
  </code></pre>
  
  <p>should return:</p>
  
  <pre><code>[(3, 'a'), (2, 'b'), (1, 'c')].
  </code></pre>
  
  <p>This works fine but now I need to sort the list using the first element within the list of the list using this function. </p>
  
  <pre><code>results   :: [Party ] -&gt; [(Int, Party)]
  results  xs = ??? frequency (sort xs) ??? 
  </code></pre>
  
  <p>example of desired output:</p>
  
  <pre><code>[(1, "Green"), (2, "Red"), (3, "Blue")]
  </code></pre>
  
  <p>The above does not work, I have no idea what I can do. </p>
  
  <p>using regular 'sort'</p>
  
  <p>Thank you in Advance. </p>