title: Get Index while iterating list with stream
body: <pre><code>List&lt;Rate&gt; rateList = 
         guestList.stream()
                  .map(guest -&gt; buildRate(ageRate, guestRate, guest))
                  .collect(Collectors.toList());  
  
  class Rate {
      protected int index;
      protected AgeRate ageRate;
      protected GuestRate guestRate;
      protected int age;
  }
  </code></pre>
  
  <p>In the above code, is it possible to  pass index of <code>guestList</code> inside <code>buildRate</code> method. I need to pass index also while building <code>Rate</code> but could not manage to get index with <code>Stream</code>. </p>