title: Converting a map into a URI query string
body: <p>I have an Elixir <code>Map</code>:</p>
  
  <pre><code>m1 = %{a: 1, b: "fsfd", c: 123}
  </code></pre>
  
  <p>I want to convert it into a query string for <code>URI</code>. </p>
  
  <pre><code>a=1&amp;b=fsfd&amp;c=123
  </code></pre>
  
  <p>How can I do that? I've tried this:</p>
  
  <pre><code>Enum.reduce(m1, fn({k, v}, acc) -&gt; "#{acc}&amp;{k}=#{v}" end)
  </code></pre>
  
  <p>But it didn't work, because the <code>acc</code> didn't get pattern matched as intended.  </p>