title: Scala variable with multiple types
body: <p>There is <code>Either</code> in scala which allow a variable to have 2 types value.</p>
  
  <pre><code>val x: Either[String, Int] = Left("apple")
  </code></pre>
  
  <p>However, I want to have more than 2 types for variable x e.g. <code>{String, Int, Double, List[String] }</code>. </p>
  
  <pre><code>e.g. val x:[type can be either String, Int, Double or List[String]]
  //So that I can store either String, Int, Double, List[String] value in x.
  </code></pre>
  
  <p>Is there any way to achieve this?</p>