Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Specialisation of CFStream_stream.Result
for 'a
Or_error.t
type 'a t = 'a Core_kernel.Std.Or_error.t Stream.t
map' rs ~f
maps Ok
results with a partial function f
Generalization of map
with two streams of results. If the two streams fail simultaneously, one of the two errors is propagated.
Analoguous of map2_exn
for total functions
val fold :
'a t ->
init:'b ->
f:('b -> 'a -> 'b Core_kernel.Std.Or_error.t) ->
'b Core_kernel.Std.Or_error.t
fold rs ~init ~f
computes a value by iterating f
on each Ok
element of rs
starting from init
. The computation stops with an Error
case as soon as one is met on the stream, or when f
returns one.
val fold' :
'a t ->
init:'b ->
f:('b -> 'a -> 'b) ->
'b Core_kernel.Std.Or_error.t
Same as fold
, but for total functions.