title: Combine array of array into all possible combinations, forward only, in Ruby
body: <p>I have an array of arrays, like so:</p>
  
  <pre><code>[['1','2'],['a','b'],['x','y']]
  </code></pre>
  
  <p>I need to combine those arrays into a string containing all possible combinations of all three sets, forward only. I have seen lots of examples of all possible combinations of the sets in any order, that is not what I want. For example, I do not want any of the elements in the first set to come after the second set, or any in the third set to come before the first, or second, and so on. So, for the above example, the output would be:</p>
  
  <pre><code>['1ax', '1ay', '1bx', '1by', '2ax', '2ay', '2bx', '2by']
  </code></pre>
  
  <p>The number of arrays, and length of each set is dynamic.</p>
  
  <p>Does anybody know how to solve this in Ruby?</p>