As long as the documentation defines the so called encounter order I think it's reasonble to ask if we can reverse that encounter order somehow. Looking at the API
streams provide us with, I didn't find anything related to ordering except sorted()
.
If I have a stream produced say from a List
can I swap two elements of that stream and therefore producing another stream
with the modified encounter order.
Does it even make sense to talking about "swapping" elements in a stream or the specification say nothing about it.