Map.Makeval empty : 'a tval is_empty : 'a t -> booliter_e f m applies f to the bindings of m one by one in an unspecified order. If all the applications result in Ok (), then the result of the iteration is Ok (). If any of the applications results in Error e then the iteration stops and the result of the iteration is Error e.
val iter_es :
(key -> 'a -> (unit, 'trace) Stdlib.result Lwt.t) ->
'a t ->
(unit, 'trace) Stdlib.result Lwt.titer_es f m applies f to the bindings of m in an unspecified order, one after the other as the promises resolve. If all the applications result in Ok (), then the result of the iteration is Ok (). If any of the applications results in Error e then the iteration stops and the result of the iteration is Error e.
val iter_ep :
(key -> 'a -> (unit, 'error) Stdlib.result Lwt.t) ->
'a t ->
(unit, 'error list) Stdlib.result Lwt.titer_ep f m applies f to the bindings of m. All the applications are done concurrently. If all the applications result in Ok (), then the result of the iteration is Ok (). If any of the applications results in Error e then the result of the iteration is Error e.
fold f m init is
let acc = f k1 d1 init in
let acc = f k2 d2 acc in
let acc = f k3 d3 acc in
…where kN is the key bound to dN in m.
val fold_e :
(key -> 'a -> 'b -> ('b, 'trace) Stdlib.result) ->
'a t ->
'b ->
('b, 'trace) Stdlib.resultfold_e f m init is
let open Result_syntax in
let* acc = f k1 d1 init in
let* acc = f k2 d2 acc in
let* acc = f k3 d3 acc in
…where kN is the key bound to dN in m.
fold_s f m init is
let open Lwt_syntax in
let* acc = f k1 d1 init in
let* acc = f k2 d2 acc in
let* acc = f k3 d3 acc in
…where kN is the key bound to dN in m.
val fold_es :
(key -> 'a -> 'b -> ('b, 'trace) Stdlib.result Lwt.t) ->
'a t ->
'b ->
('b, 'trace) Stdlib.result Lwt.tfold_es f m init is
let open Lwt_result_syntax in
let* acc = f k1 d1 init in
let* acc = f k2 d2 acc in
let* acc = f k3 d3 acc in
…where kN is the key bound to dN in m.
val cardinal : 'a t -> intmin_binding_opt is an alias for min_binding included for compatibility with the Stdlib.
max_binding_opt is an alias for max_binding included for compatibility with the Stdlib.
choose_opt is an alias for choose included for compatibility with the Stdlib.
find_opt is an alias for find included for compatibility with the Stdlib.
find_first_opt is an alias for find_first included for compatibility with the Stdlib.
find_last_opt is an alias for find_last included for compatibility with the Stdlib.