Module Finite.Async
Represents the finite version of an Async
stream.
val pure : 'a -> 'a t
val empty : unit -> 'a t
val from_list : 'a list -> 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val filter : ('a -> bool) -> 'a t -> 'a t
val scan : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b t
val take : int -> 'a t -> 'a t
val take' : ?close:unit Sync.output -> int -> 'a Async.t -> 'a t
Takes
n
elements from an infinite stream and converts it to a finite one. Optionally takes an output stream (?close
) to close the connection atSignal.t.EndOfSignal
if the async stream is connection-based.