Re:SICP Goodness – Why you don't need looping constructs
by wffurr on Friday June 29, 2018 @07:36AM
(#17423866)
It depends on whether the underlying stream supports "peek". If not, in order to determine whether there is a next element, the iterator must consume the next element and hold it in local memory until a call to next.
That can matter in certain cases of large objects or slow or side-effecting stream access
That can matter in certain cases of large objects or slow or side-effecting stream access