package octez-proto-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=dbc3b675aee59c2c574e5d0a771193a2ecfca31e7a5bc5aed66598080596ce1c
sha512=b97ed762b9d24744305c358af0d20f394376b64bfdd758dd4a81775326caf445caa57c4f6445da3dd6468ff492de18e4c14af6f374dfcbb7e4d64b7b720e5e2a
doc/octez-proto-libs.protocol-environment/Tezos_protocol_environment/V6/Make/Context_hash/Map/index.html
Module Context_hash.Map
include Map.S with type key = t
type key = t
val empty : 'a t
val is_empty : 'a t -> bool
val iter_e :
(key -> 'a -> (unit, 'trace) Pervasives.result) ->
'a t ->
(unit, 'trace) Pervasives.result
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) Pervasives.result Lwt.t) ->
'a t ->
(unit, 'trace) Pervasives.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 fold_e :
(key -> 'a -> 'b -> ('b, 'trace) Pervasives.result) ->
'a t ->
'b ->
('b, 'trace) Pervasives.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) Pervasives.result Lwt.t) ->
'a t ->
'b ->
('b, 'trace) Pervasives.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
val iter_ep :
(key -> 'a -> (unit, 'error Error_monad.trace) Pervasives.result Lwt.t) ->
'a t ->
(unit, 'error Error_monad.trace) Pervasives.result Lwt.t
val encoding : 'a Data_encoding.t -> 'a t Data_encoding.t