The difference to using View.from(iterator) is that the view caches all values that are read from the iterator. For the two iterators obtained with Iterator.duplicate, only those values that are between the current cursors of the two iterators are cached.
The difference to using
View.from(iterator)
is that the view caches all values that are read from the iterator. For the two iterators obtained withIterator.duplicate
, only those values that are between the current cursors of the two iterators are cached.