There are no guarantees regarding the state of the iterator after calling take on it.
The problem with iterators is that many useful operations can be implemented only due to the occurrence of side effects. All these operations have a certain direct effect, but may also have side effects that cannot be indicated (or will complicate the implementation).
In the take case, there are implementations that clone the internal state of the iterator and others that promote the iterator. If you want to guarantee that there are no side effects, you will have to use immutable data structures; in any other case, your code should rely only on direct effects.
Moritz
source share