title: Scala - Combine two lists in an alternating fashion
body: <p>How do I merge 2 lists in such a way that the resulting list contains the elements of 2 lists in alternating fashion in Scala.</p>
  
  <p><strong>Input:</strong></p>
  
  <pre><code>val list1 = List("Mary", "a", "lamb")
  
  val list2 = List("had", "little")
  </code></pre>
  
  <p><strong>Output:</strong></p>
  
  <pre><code>List("Mary", "had", "a", "little", "lamb")
  </code></pre>