Suppose we have a collection (or stream?)
{"1","2","3","4"...}
now we want to take two elements and compose a pair like this
{{"1","2"}, {"2","3"},{"3","4"}..}
We know how to do that the ugly way (for loop).
I wonder how do we do this with java 8 streams?
Because approaches in java streams and reactive extensions are pretty much same (both are monads) I thought there might be something alike RX .pick(2)
which would trigger event when 2 elements arrive...