title: What is the difference in these way of creating a list in Kotlin ? My result1 is valid but result2 is invalid
body: <pre><code>val list1 = listOf(1,2,3,4,5,6,7,8,9)
  val list2 = listOf(1..9)
  </code></pre>
  <p>/*
  my result1 is valid but result2 gives error
  */</p>
  <pre><code>val result1= list1.filter{i -&gt; i&gt;2} 
  
  val result2 = list2.filter{i -&gt; i&gt;2}
  </code></pre>