package tezos-lwt-result-stdlib
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=6b33e0549574c89a63538c94ce5555dd141e3c0fb5d934abff07d702fa3244d2
sha512=681a197baabec6e2f806871d43490382243207518f8fcf932741cd314d8717e46db2b6a5adc222f8726083a5dd911083b4931b7e878ab815f8f1a32763d1bf93
doc/bare_structs/Bare_structs/Map/Make/index.html
Module Map.Make
Parameters
Signature
val empty : 'a t
val is_empty : 'a t -> bool
iter_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.t
iter_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.t
iter_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
.
val fold_e :
(key -> 'a -> 'b -> ('b, 'trace) Stdlib.result) ->
'a t ->
'b ->
('b, 'trace) Stdlib.result
fold_e f m init
is f k1 d1 init >>? fun acc -> f k2 d2 acc >>? fun acc -> …
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.t
fold_es f m init
is f k1 d1 init >>=? fun acc -> f k2 d2 acc >>=? fun acc -> …
where kN
is the key bound to dN
in m
.
val cardinal : 'a t -> int