Is there a concise way to iterate over a stream whilst having access to the index in the stream?
String[] names = {\"Sam\",\"Pamela\", \"Dave\", \"Pascal\",
you don't need a map necessarily that is the closest lambda to the LINQ example:
map
int[] idx = new int[] { 0 }; Stream.of( names ).filter( name -> name.length() <= idx[0]++ ).collect( Collectors.toList() );