title: ignore second argument of a function
body: <p>Say I have this code:</p>
  
  <pre><code>import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  let s = Set.fromList [0,1,2]
      m = Map.fromList [(1,"a"),(2,"b"),(3,"c")]
  in Map.filterWithKey (\k _ -&gt; Set.member k s) m
  </code></pre>
  
  <p>I wanted to get rid of the lambda expression:</p>
  
  <pre><code>Map.filterWithKey (flip Set.member s . const) m
  </code></pre>
  
  <p>but this does not compile. and I cannot figure why.. Please help.</p>
  
  <pre><code>Couldn't match type ‘Bool’ with ‘[Char] -&gt; Bool’
  Expected type: (b0 -&gt; a) -&gt; Set.Set (b0 -&gt; a) -&gt; [Char] -&gt; Bool
    Actual type: (b0 -&gt; a) -&gt; Set.Set (b0 -&gt; a) -&gt; Bool
  In the first argument of ‘flip’, namely ‘Set.member’
  In the first argument of ‘(.)’, namely ‘flip Set.member s’
  </code></pre>