title: Why calling size method on iterator pushes cursor to end?
body: <p>In below code I iterate over an iterator within an array and output is as expected : </p>
  
  <pre><code>val array = Array(List("1").iterator)     //&gt; array  : Array[Iterator[String]] = Array(non-empty iterator)
  
      for(a &lt;- array){
          //a.size
          for(element &lt;- a){
              println(element)          //&gt; 1
          }
      }
  </code></pre>
  
  <p>But if I add <code>a.size</code> it seems like this pushes the iterator cursor to end of collection as the iterator appears empty : </p>
  
  <pre><code>val array = Array(List("1").iterator)     //&gt; array  : Array[Iterator[String]] = Array(non-empty iterator)
  
  for(a &lt;- array){
      a.size
      for(element &lt;- a){
          println(element)
      }
  }
  </code></pre>
  
  <p>Why is this occuring ? Checking the size of the elements should'nt have an impact on iteration of the collection ? Looking at the size method : </p>
  
  <pre><code>  def size: Int = {
      var result = 0
      for (x &lt;- self) result += 1
      result
    }
  </code></pre>
  
  <p>It doesn't amend the iterator itself ?</p>
  
  <p>These samples were tried in Scala worksheet</p>