title: Merging a list of Strings using mkString vs foldRight
body: <p>I am currently trying out things in Scala, trying to get accustomed to functional programming as well as leaning a new language again (it's been a while since last time).</p>
  
  <p>Now given a list of strings if I want to merge them into one long string (e.g. <code>"scala", "is", "fun" =&gt; "scalaisfun"</code>) I figured one way to do it would be to do a <code>foldRight</code> and apply concatenation on the respective elements. Another way, admittedly much simpler, is to call <code>mkString</code>. </p>
  
  <p>I checked on github but couldn't really find the source code for the respective functions (any help on that would be appreciated), so I am not sure how the functions are implemented. From the top of my head, I think the <code>mkString</code> is more flexible but it feels that there might be a <code>foldRight</code> in the implementation somewhere. Is there any truth to it? </p>
  
  <p>Otherwise the scaladocs mention that <code>mkString</code> calls on <code>toString</code> for each respective element. Seeing that they are already strings to start with, that could be one negative point for <code>mkString</code>in this particular case. Any comments on the pros and cons of both methods, with respect to performance, simplicity/elegance etc? </p>