title: Scala: Get Items from Seq by given index (all the items above given index)
body: <p>I am new to scala, the way I understood Seq is that its an ordered list. So I was wanted to see if I can get all the items based on a given index where retrieved items index is lesser than the given items index. </p>
  
  <p>Lets say I have Seq: </p>
  
  <pre><code>scala&gt; val s = Seq(1, 2, 34 ,44 )
  s: Seq[Int] = List(1, 2, 34, 44)
  </code></pre>
  
  <p>Given index index as 3rd item I was expecting to get all the items(values) that has a lower index position than the given index.</p>
  
  <p>Keep this in mind I wrote the following and Looks like I am wrong.</p>
  
  <pre><code>scala&gt; val x = s.map {
       | id =&gt; id &lt; s.indexOf(3) }
  x: Seq[Boolean] = List(false, false, false, false)
  </code></pre>
  
  <p>What what I want is Seq(1,2,34) as the output because if of those element's index is less than the index of 44.</p>
  
  <p>Whats the best way to do this? </p>