title: Create function to remove duplicates from Haskell list
body: <p>I am trying to build a function that takes the first element of a string, and removes all other elements equal to it from the string. Then does the same for the second character.</p>
  
  <p>Ie - "Heello" would become "Helo" and "Chocolate" "Chlate"</p>
  
  <p>My original attempt</p>
  
  <pre><code>removeSuccessor :: String -&gt; String
  removeSuccessor x = [c | c &lt;- x, x ! `elem` c]
  </code></pre>
  
  <p>But that doesn't seem to work.. suggestions?</p>