module Polytables:sig..end
Polymorphic tables (using Map)
Warning: this module is not thread safe!
type 'a key
The type of key for a piece of data of type 'a
type t
The type of tables
val create : unit -> tcreates a new table
val make_key : unit -> 'a keycreate a new key for each data you want to save
val set : table:t -> key:'a key -> value:'a -> unitset t k v associates v to k in t
val get : table:t -> key:'a key -> 'aget t k returns the current binding of k in t or raises Not_found
val remove : table:t -> key:'a key -> unitremove t k remove the current binding of k in t if it exists
val clear : table:t -> unitclear t remove all data from t