title: Scala list append a class in list and retrieve item
body: <p>new to scala so missing basic of list. </p>
  
  <p>I'm trying to make a list of following class </p>
  
  <pre><code>  case class Person (val name: String, val age:Int, val email: String)
  </code></pre>
  
  <p>How do I make a list immutable list of Person class?</p>
  
  <p>I tried:-</p>
  
  <pre><code>val list: List[Person] = List(Person("",0,"")) // compilation ok
  list.::(person) // compile ok
  </code></pre>
  
  <p>But when I  check size it is 1. It should be 2. Also I don't see the added person in the list.</p>
  
  <p>Please let me know how do I make list of Person class, inset new person and then retrieve person if either age or name or email or by index as well.</p>
  
  <p>Please don't refer me to api doc <a href="http://www.scala-lang.org/api/current/index.html#scala.collection.immutable.List" rel="nofollow">http://www.scala-lang.org/api/current/index.html#scala.collection.immutable.List</a></p>
  
  <p>It is hard to understand :(   </p>