Prelude.Hashtbl
Extension of Hashtbl with functions to serialize to and deserialize from yojson, along with some other helpers
A Hashtbl is a represented as a list of key-value pairs, where a key-value pair is list of two elements
Extension of Hashtbl with functions to serialize to and deserialize from yojson, along with some other helpers
A Hashtbl is a represented as a list of key-value pairs, where a key-value pair is list of two elements
Extension of Hashtbl with functions to serialize to and deserialize from yojson, along with some other helpers
A Hashtbl is a represented as a list of key-value pairs, where a key-value pair is list of two elements
include module type of struct include Stdlib.Hashtbl end
val create : ?random:bool -> int -> ('a, 'b) t
val clear : ('a, 'b) t -> unit
val reset : ('a, 'b) t -> unit
val add : ('a, 'b) t -> 'a -> 'b -> unit
val find : ('a, 'b) t -> 'a -> 'b
val find_opt : ('a, 'b) t -> 'a -> 'b option
val find_all : ('a, 'b) t -> 'a -> 'b list
val mem : ('a, 'b) t -> 'a -> bool
val remove : ('a, 'b) t -> 'a -> unit
val replace : ('a, 'b) t -> 'a -> 'b -> unit
val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit
val filter_map_inplace : ('a -> 'b -> 'b option) -> ('a, 'b) t -> unit
val fold : ('a -> 'b -> 'acc -> 'acc) -> ('a, 'b) t -> 'acc -> 'acc
val length : ('a, 'b) t -> int
val stats : ('a, 'b) t -> statistics
val to_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t
val to_seq_keys : ('a, 'b) t -> 'a Stdlib.Seq.t
val to_seq_values : ('a, 'b) t -> 'b Stdlib.Seq.t
val add_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t -> unit
val replace_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t -> unit
val of_seq : ('a * 'b) Stdlib.Seq.t -> ('a, 'b) t
module type HashedType = Utils.Prelude.Hashtbl.HashedType
module type S = Utils.Prelude.Hashtbl.S
module Make = Utils.Prelude.Hashtbl.Make
module type SeededHashedType = Utils.Prelude.Hashtbl.SeededHashedType
module type SeededS = Utils.Prelude.Hashtbl.SeededS
module MakeSeeded = Utils.Prelude.Hashtbl.MakeSeeded
val singleton : 'a -> 'b -> ('a, 'b) t
val find_or_else_add : ('a, 'b) t -> 'a -> (unit -> 'b) -> 'b
Analog to List.find_map
val remove_all : ('a, 'b) t -> 'a -> unit
val of_yojson :
(Yojson.Safe.t -> ('a, string) Stdlib.result) ->
(Yojson.Safe.t -> ('b, string) Stdlib.result) ->
Yojson.Safe.t ->
(('a, 'b) t, string) Stdlib.result
val to_yojson :
('a -> Yojson.Safe.t) ->
('b -> Yojson.Safe.t) ->
('a, 'b) t ->
Yojson.Safe.t