title: How to select values 2+ after any number in a list?
body: <p>Is there any way to select the second, third (etc) value from a value in a list in Groovy? I'm still very new to programming in general and am just wondering if there is an easy way to do this.</p>
  
  <p>For example, if I have the list</p>
  
  <pre><code>[1, 2, 3, 4, 5, 6]
  </code></pre>
  
  <p>I want to select the next two values after each value using a for loop:</p>
  
  <pre><code>for 1: (1, 2, 3)
  for 2: (2, 3, 4)
  </code></pre>
  
  <p>...and so on.</p>
  
  <p>Is that easily possible? Thanks in advance!</p>