title: Ruby: How do I join elements of an array together with a prefix?
body: <p>I have an array like so:</p>
  
  <pre><code>["marblecake", "also", "the", 1337]
  </code></pre>
  
  <p>I would like to get back a string which contains each element of the array prefixed by some specified string, then joined together by another specified string. For example,</p>
  
  <pre><code>["marblecake", "also", "the", 1337].join_with_prefix("%", "__")
  </code></pre>
  
  <p>should result in</p>
  
  <pre><code># =&gt; %marblecake__%also__%the__%1337
  </code></pre>
  
  <p>How might I do this?</p>