Stream (abstract data type)
In type theory and functional programming, a stream is a potentially infinite analog of a list, given by the coinductive definition: data Stream α = Nil Stream (abstract data type) is an encyclopedia record, sourced from en.wikipedia.org, last updated 2026-06-23, source revision https://en.wikipedia.org/w/index.php?oldid=1360739285. Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.
In type theory and functional programming, a stream is a potentially infinite analog of a list, given by the coinductive definition: data Stream α = Nil | Cons α (Stream α) Generating and computing with streams requires lazy evaluation, either implicitly in a lazily evaluated language or by creating and forcing thunks in an eager language. In total languages they must be defined as codata and can be iterated over using (guarded) corecursion. Java provides the interface under the namespace. JavaScript provides the , and interfaces. Python have the and classes in the module. .NET provides the abstract class which is implemented by classes such as and . In Rust a struct can implement the trait. There is also the struct wraps an in-memory buffer.
Cite this
"Stream (abstract data type)". 1782196095. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1360739285 JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy