3 * Laboratoire PPS - Université Paris Diderot - CNRS
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 Polymorphic tables (using Map)
22 @author Jérôme Vouillon
27 (** Warning: this module is not thread safe! *)
29 (** The type of key for a piece of data of type 'a *)
32 (** The type of tables *)
35 (** creates a new table *)
36 val create
: unit -> t
38 (** create a new key for each data you want to save *)
39 val make_key
: unit -> 'a key
41 (** [set t k v] associates [v] to [k] in [t] *)
42 val set
: table
:t
-> key
:'a key
-> value:'a
-> unit
44 (** [get t k] returns the current binding of [k] in [t] or raises [Not_found] *)
45 val get
: table
:t
-> key
:'a key
-> 'a
47 (** [clear t] remove all data from t *)
48 val clear
: table
:t
-> unit