package caqti
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=e1f580848faf3a54f23174067f2c75f77f6a2fe50ca8bc923428d0e1841192c5
sha512=7a11edfcfbbe4855347b066e222cf6bf46d1afedcd4978661b9a2b3931921faa1768a6bc24031fd3afa84537fe2adc8b139399deb77120461bee8fb394d68e82
doc/caqti.blocking/Caqti_blocking/Stream/index.html
Module Caqti_blocking.Stream
val fold :
f:('a -> 'state -> 'state) ->
('a, 'err) t ->
'state ->
('state, 'err) result futurefold ~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 future) ->
('a, 'clog) t ->
'state ->
('state, [> `Congested of 'clog ] as 'err) result futurefold_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 future) ->
('a, 'clog) t ->
(unit, [> `Congested of 'clog ] as 'err) result futureiter_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.