title: How to merge embedded array with array in Ruby
body: <p>I have arrays and nested arrays, such that:</p>
  
  <pre><code>a = [1,2]
  b = [[3,4],[5,6]]
  c = [7,8]
  </code></pre>
  
  <p>What's the best way to create </p>
  
  <pre><code>d = [[1,2],[3,4],[5,6],[7,8]]
  </code></pre>
  
  <p>in Ruby?</p>
  
  <p>UPDATE:</p>
  
  <p>The goal is to create a method below:</p>
  
  <pre><code>def foo([a,b,c])
    --some logic that iterates through each array--
  end
  </code></pre>