Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Stream.Or_error
SourceSpecialisation of CFStream_stream.Result
for 'a Or_error.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.Or_error.t) ->
'b Core_kernel.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.