title: scala: create map with keys from map.keys
body: <p>I have a map, let's say:</p>
  
  <pre><code>m1:Map[String, Int] = Map(a -&gt; 1, b -&gt; 2, c -&gt; 3, d -&gt; 4)
  </code></pre>
  
  <p>and i now want to create a second map which has the same keys as the existing map and takes 0 as value for each key. So it should look like this:</p>
  
  <pre><code>m2:Map[String, Int] = Map(a -&gt; 0, b -&gt; 0, c -&gt; 0, d -&gt; 0)
  </code></pre>
  
  <p>I tried a for loop inside the map definition, but it didn't really work. How can I do that?</p>
  
  <p>thanks!</p>