title: Take every nth element from a Java 8 stream
body: <p>Suppose I have a list like this :</p>
  
  <pre><code>[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  </code></pre>
  
  <p>Is it possible to use a Java 8 stream to take every second element from this list to obtain the following?</p>
  
  <pre><code>[1, 3, 5, 7, 9]
  </code></pre>
  
  <p>Or maybe even every third element?</p>
  
  <pre><code>[1, 4, 7, 10]
  </code></pre>
  
  <p>Basically, I'm looking for a function to take every nth element of a stream:</p>
  
  <pre><code>List&lt;Integer&gt; list = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
  List&lt;Integer&gt; list2 = list.stream().takenth(3).collect(Collectors.toList());
  System.out.println(list2);
  // =&gt; [1, 4, 7, 10]
  </code></pre>