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 | 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.[src] In total languages they must be defined as codata and can be iterated over using (guarded) corecursion.[src] Java provides the interface under the namespace.[src] JavaScript provides the , and interfaces.[src] Python have the and classes in the module.[src] .NET provides the abstract class which is implemented by classes such as and .[src] In Rust a struct can implement the trait.[src] There is also the struct wraps an in-memory buffer.[src]
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.[src] In total languages they must be defined as codata and can be iterated over using (guarded) corecursion.[src] Java provides the interface under the namespace.[src] JavaScript provides the , and interfaces.[src] Python have the and classes in the module.[src] .NET provides the abstract class which is implemented by classes such as and .[src] In Rust a struct can implement the trait.[src] There is also the struct wraps an in-memory buffer.[src]
16 sentences · 16 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Stream (abstract data type)." encyclopegia.org, 2026, https://encyclopegia.org/wiki/stream-abstract-data-type. Accessed 01 December 2026.
Chicago
"Stream (abstract data type)." encyclopegia.org. Accessed December 1, 2026. https://encyclopegia.org/wiki/stream-abstract-data-type.
APA
encyclopegia.org. (2026). Stream (abstract data type). Retrieved December 1, 2026, from https://encyclopegia.org/wiki/stream-abstract-data-type
Accessed December 1, 2026 · CC BY-SA 4.0 · citation page · JSON