Module Memo.Mk
With the Mk functor, you can also directly provide a Cache module, which should have the signature Hashtbl.S. We will include your cache module and use it to define a memo function. It should be useful only if you want to use another Hashtbl implementation or things like this.
Parameters
Cache : Stdlib.Hashtbl.S
Signature
include Cache
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 t