Fuzion Logo
flang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

asStream

🌌list.asStream

create stream from this list

In contrast to list's immutable Cons cells, a stream instance is mutable, i.e,
it cannot be shared with threads or used in pure functions

redefines Sequence.asStream:
create a stream of T.

A stream contains mutable state, so it cannot be reused or shared
between threads.

Default implementation uses asList. Heirs must redefine at least
one of asList or asStream.


redefines stream.hasNext:
does this stream have one more element?


redefines stream.next:
the next element in this stream