title: How to iterate with enumeration using rayon?
body: <p>I can iterate and process both index and the variable within such as:</p>
  <pre><code>let x = vec![5, 6, 7, 8];
  
  for (index, val) in x.iter().enumerate() {
      println!(&quot;{} {}&quot;, val, index);
  }
  </code></pre>
  <p>Now with rayon, from what I know, parallel iteration through <code>par_iter()</code> doesn't support enumerate because it has <code>ParallelIterator</code>.</p>
  <p>Rayon seem to have <code>IndexedParallelIterator</code>, but I am not sure how to use it to produce similar result as the simple for loop shown above.</p>
  <p>Is there anyway to keep track of the index of each value when parallel iterating? How would the simple for loop look like?</p>