package fiber
Library
Module
Module type
Parameter
Class
Class type
Stream inputs.
A In.t
value represents the side of a stream where values can be read from. A stream input can only be consumed by one fiber at a time. Trying to access a stream input concurrently will result in an exception.
When passing a stream input through one of the transformation functions such as filter_map
or iteration function, the original stream input can no longer be used for another purpose.
Create a stream that is fed from a generator function. Every time a value is requested, this function is called to produce a new value. If the function raises, the stream will no longer be usable.
val of_list : 'a list -> 'a t
Create a stream that yields elements from the given list in order.
val empty : unit -> 'a t
The empty stream.
Consumes and returns the next element from the stream. Once the stream is exhausted, read
always returns None
.