title: Grouping Java8 stream without collecting it
body: <p>Is there any way in Java 8 to group the elements in a <code>java.util.stream.Stream</code> without collecting them? I want the result to be a <code>Stream</code> again. Because I have to work with a lot of data or even infinite streams, I cannot collect the data first and stream the result again.</p>
  
  <p>All elements that need to be grouped are consecutive in the first stream. Therefore I like to keep the stream evaluation lazy.</p>