Elixir: How to filter a Map by keys
<p>I have a Map with key-value pairs and a Tuple with atoms. I want to remove any entry from the Map where the key is not an atom in the Tuple</p>

<pre><code>m = %{value1: nil, value2: nil, value4: nil}
t = {:value1, :value3, :value4}
# The result should be %{value1: nil, value4: nil}
</code></pre>

<p>It is kind of an intersect problem. I looked into <code>Enum.filter</code> and <code>MapSet</code> but didn't find an elegant solution. This must be a common problem and your input is highly appreciated.</p>