package caqti
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4dadf33904c9fd25065dbf6739aa0a9eaaaea000c6981c17a534b475dd5c3891
sha512=13c1cbeff3ee0e54ed1cc8f8df5f7660c292d5d50faa9480916f3c7e578961ab3b3779395c0664346cf42509f7b98d986e8377133542869a462288d6c0e34cbf
doc/caqti.blocking/Caqti_blocking/Stream/index.html
Module Caqti_blocking.StreamSource
fold ~f stream acc consumes the remainder elements e1, ..., eN of stream and returns Ok (acc |> f e1 |> ... |> f eN) if no error occurred
val fold_s :
f:('a -> 'state -> ('state, 'err) result) ->
('a, 'clog) t ->
'state ->
('state, [> `Congested of 'clog ] as 'err) resultfold_s ~f stream acc consumes the remainder of stream, passing each element in order to f along with the latest accumulation starting at acc, and returning the final accumulation if successful. An error result may be due to either the stream provider or the callback, as distinguished with the `Congested constructor.
val iter_s :
f:('a -> (unit, 'err) result) ->
('a, 'clog) t ->
(unit, [> `Congested of 'clog ] as 'err) resultiter_s ~f stream consumes the remainder of stream, passing each element in order to f. An error result may be due to either the steram provider or the callback, as distinguished with the `Congested constructor.
to_rev_list stream consumes the remainder of stream, returning a list of its element in reverse order of production.
to_list stream consumes the remainder of stream, returning a list of its element in order of production.
of_list xs is a non-failing finite stream (re)producing the elements xs in order of occurrence.