Converting List to Map, Elixir way
<p>I have a function which returns a Map, converted from List(:erlang.memory()). It works as I expected, but it doesn't seem to be beautiful. How can I refine the snippet to more elixir-way(meaning more beautiful logic)?</p>

<pre><code>{{:total, total}, {:processes, processes}, {:processes_used, processes_used}, {:system, system}, {:atom, atom}, {:atom_used, atom_used}, {:binary, binary}, {:code, code}, {:ets, ets}} =
  :erlang.memory()
  |&gt; List.to_tuple()

params = %{
  total: total,
  processes: processes,
}
</code></pre>