Oh, you’re talking about turning an Iterator
into a Stream
and passing it to someone? I recommend you don’t do that. Iterators
are extremely hard to reason about and should only be used locally (ideally introduced and eliminated in a single expression).
If that’s not what you’re referring to then I remain confused.