title: Haskell: Filtering a list based on a predicate for all other elements in the list
body: <p>I have a list of natural numbers <code>[1..n]</code> (this list is never empty) and I would like to filter each element by testing a predicate with all other elements in the list. I would like to return a list of those numbers who never fulfilled the predicate. My idea is this:</p>
  <pre><code>filter (\x -&gt; 1 == length [y| y &lt;- [1..n], pred y x]) [1..n]
  </code></pre>
  <p>I am testing if the length is equal to 1 since for <code>x==y</code> the predicate returns true.</p>
  <p>This does work as intended, however, I was wondering if there is a cleaner way to do this. I'm not really looking for more performance, but rather a more simple solution.</p>