title: Flatten list of any in scala
body: <p>I have</p>
  
  <pre><code>val a = List(1, List(2,3), 4)
  </code></pre>
  
  <p>I want to convert that list of any to <code>List[Int]</code>. How can I do this?</p>
  
  <p>Expected answer is:</p>
  
  <pre><code>List(1,2,3,4)
  </code></pre>