title: What's the difference between :: and ::: in Scala
body: <pre><code>val list1 = List(1,2)
  val list2 = List(3,4)
  </code></pre>
  
  <p>then</p>
  
  <pre><code>list1::list2 returns:
  
  List[Any] = List(List(1, 2), 3, 4)
  
  list1:::list2 returns:
  
  List[Int] = List(1, 2, 3, 4)
  </code></pre>
  
  <p>I saw the book writes that when use <code>::</code> it also results <code>List[Int] = List(1, 2, 3, 4)</code>. My Scala version is 2.9.</p>