ABSTRACT

A stream may be viewed as a lazy list—the values in a stream do not exist in memory but are computed as needed. Consequently, when one feeds into another, the first stream does nothing until a value is demanded by the second stream. This results in a “pull” architecture rather than the more usual “push” architecture. Java and Scala have streams, while Python has a related construct called a generator.