title: Is there a concise way to iterate over a stream with indices in Java 8?
body: <p>Is there a concise way to iterate over a stream whilst having access to the index in the stream?</p>
  
  <pre><code>String[] names = {"Sam","Pamela", "Dave", "Pascal", "Erik"};
  
  List&lt;String&gt; nameList;
  Stream&lt;Integer&gt; indices = intRange(1, names.length).boxed();
  nameList = zip(indices, stream(names), SimpleEntry::new)
          .filter(e -&gt; e.getValue().length() &lt;= e.getKey())
          .map(Entry::getValue)
          .collect(toList());
  </code></pre>
  
  <p>which seems rather disappointing compared to the LINQ example given there</p>
  
  <pre><code>string[] names = { "Sam", "Pamela", "Dave", "Pascal", "Erik" };
  var nameList = names.Where((c, index) =&gt; c.Length &lt;= index + 1).ToList();
  </code></pre>
  
  <p>Is there a more concise way?</p>
  
  <p>Further it seems the zip has either moved or been removed...</p>