package octez-proto-libs
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65
doc/octez-proto-libs.protocol-environment/Tezos_protocol_environment/V12/Make/Context_hash/Map/index.html
Module Context_hash.Map
include Map.S with type key = t
type key = tval empty : 'a tval is_empty : 'a t -> boolval iter_e :
(key -> 'a -> (unit, 'trace) Pervasives.result) ->
'a t ->
(unit, 'trace) Pervasives.resultiter_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.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 fold_e :
(key -> 'a -> 'b -> ('b, 'trace) Pervasives.result) ->
'a t ->
'b ->
('b, 'trace) Pervasives.resultfold_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.tfold_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 -> intval iter_ep :
(key -> 'a -> (unit, 'error Error_monad.trace) Pervasives.result Lwt.t) ->
'a t ->
(unit, 'error Error_monad.trace) Pervasives.result Lwt.tval encoding : 'a Data_encoding.t -> 'a t Data_encoding.t