title: Using pipe with filter and map in elixir
body: <p>I am attempting to filter out some values from a map in Elixir. </p>
  
  <p>This:</p>
  
  <pre><code>params = %{"blah" =&gt; "blah", "vtha" =&gt; "blah"}
  params 
    |&gt;  Enum.filter fn {k, v} -&gt; k == v end 
    |&gt;  Enum.map(fn {k, v} -&gt; {k, v} end)
  </code></pre>
  
  <p>Result in this Error:
       ** (FunctionClauseError) no function clause matching in Enumerable.Function.reduce/3</p>
  
  <p>But both the filter and map operations work in isolation. </p>
  
  <pre><code>Enum.filter params, fn {k, v} -&gt; k == v end 
  Enum.map(params, fn {k, v} -&gt; {k, v} end)
  </code></pre>
  
  <p>They don't work when piped. </p>
  
  <p>I am sure I am missing something obvious. </p>