title: Scala Map foreach
body: <p>given:</p>
  
  <pre><code>val m = Map[String, Int]("a" -&gt; 1, "b" -&gt; 2, "c" -&gt; 3)
  m.foreach((key: String, value: Int) =&gt; println("&gt;&gt;&gt; key=" + key + ", value=" + value))
  </code></pre>
  
  <p>why does the compiler complain </p>
  
  <pre><code>error: type mismatch
  found   : (String, Int) =&gt; Unit
  required: (String, Int) =&gt; ?
  </code></pre>