title: Filtering a Data.Map against its values, compilation error
body: <p>I would like to filter a Data.map against its values; more precisely the map keys are <code>(Int,Int)</code> and the value is of type Int.
  I want to keep only entries where the key is >=2</p>
  
  <p>here is the function creating the map:</p>
  
  <pre><code>countElems :: [(Int,Int)] -&gt; M.Map (Int,Int) Int
  countElems = M.fromListWith (+) . flip zip (repeat 1)
  </code></pre>
  
  <p>Here is the (wrong) code filtering this map:</p>
  
  <pre><code>let elems = countElems $ take 10000 liste7
  let elems2 = filter (\i -&gt; i &gt; 2) elems
  putStrLn $ show elems2
  </code></pre>
  
  <p>The error is at the filter line:</p>
  
  <pre><code>Couldn't match expected type `[a0]'
              with actual type `M.Map (Int, Int) Int'
  In the second argument of `filter', namely `elems'
  In the expression: filter (\ i -&gt; i &gt; 2) elems
  In an equation for `elems2': elems2 = filter (\ i -&gt; i &gt; 2) elems
  </code></pre>
  
  <p>I don't understand this error message.</p>