Module Memo.MakeWeak
Functor that works like the Make one, but the bindings in the memoïzation cache will be weak, allowing the garbage collector to remove them if they are not used somewhere else.
Parameters
H : Stdlib.Hashtbl.HashedType
Signature
val create : int -> 'a tval clear : 'a t -> unitval reset : 'a t -> unitval copy : 'a t -> 'a tval add : 'a t -> key -> 'a -> unitval remove : 'a t -> key -> unitval find : 'a t -> key -> 'aval find_opt : 'a t -> key -> 'a optionval find_all : 'a t -> key -> 'a listval replace : 'a t -> key -> 'a -> unitval mem : 'a t -> key -> boolval iter : (key -> 'a -> unit) -> 'a t -> unitval filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unitval fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'bval length : 'a t -> intval stats : 'a t -> Stdlib.Hashtbl.statisticsval to_seq : 'a t -> (key * 'a) Stdlib.Seq.tval to_seq_keys : 'a t -> key Stdlib.Seq.tval to_seq_values : 'a t -> 'a Stdlib.Seq.tval add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unitval replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unitval of_seq : (key * 'a) Stdlib.Seq.t -> 'a tval memo : ((Stdlib.Ephemeron.K1.Make(H).key -> 'a) -> Stdlib.Ephemeron.K1.Make(H).key -> 'a) -> Stdlib.Ephemeron.K1.Make(H).key -> 'a