Memoizes a single-pass iterator into an iterable that can be iterated over
multiple times.
It is preferable to use toArray over memoization if you know ahead of
time that you need to traverse the entire iterator, as it will allow for
reverse iteration and sizing.
Memoizes a single-pass iterator into an iterable that can be iterated over multiple times.
It is preferable to use toArray over memoization if you know ahead of time that you need to traverse the entire iterator, as it will allow for reverse iteration and sizing.