title: scala build up string from iterating over map
body: <p>if i have a map and want to build up a string from iterating over it, is there a way to have the final string be a result of an expression instead of defining a variable and modifying that inside a loop?</p>
  
  <p>instead of this</p>
  
  <pre><code>val myMap = Map("1" -&gt; "2", "3"-&gt;"4") 
  var s = ""
  myMap foreach s += ...
  </code></pre>
  
  <p>i'd rather it be</p>
  
  <pre><code>var s = myMap something ...
  </code></pre>