title: Groovy 'Peeking' ahead with an iterator?
body: <p>I have various scenarios in loops where I would 'peek' or 'skip' ahead while iterating through items for processing.   </p>
  
  <p>One scenario is I'm enumerating through lines of a file, and there is a 'continuation' character at the end of a line indicating to combine the next line with the current line.  If I'm simply looping that isn't too hard, I can just read the next line, and bump my counter/index.</p>
  
  <p>It isn't as obvious is the pattern for doing this with my iterator.  I effectively want to consume the next line(s) without exiting my closure.  But I'm not even sure if that is possible.   Are there any good design pattern for this iteration pattern using a closure, so I don't have to resort to a less groovy loop?   Is it perhaps a form of iterator with some stack for pushing/popping items for processing?</p>