Initial snarf.
[shack.git] / libmojave / stdlib / lm_table_util.ml
blobdedf9ee0fe5c69c228f046a46c536bf10f633992
1 (*
2 * Utilities on tables.
4 * ----------------------------------------------------------------
6 * This file is part of MetaPRL, a modular, higher order
7 * logical framework that provides a logical programming
8 * environment for OCaml and other languages.
10 * See the file doc/htmlman/default.html or visit http://metaprl.org/
11 * for more information.
13 * Copyright (C) 1999-2005 PRL Group, Cornell University and Caltech
15 * This library is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Lesser General Public
17 * License as published by the Free Software Foundation,
18 * version 2.1 of the License.
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Lesser General Public License for more details.
25 * You should have received a copy of the GNU Lesser General Public
26 * License along with this library; if not, write to the Free Software
27 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
29 * Additional permission is given to link this library with the
30 * OpenSSL project's "OpenSSL" library, and with the OCaml runtime,
31 * and you may distribute the linked executables. See the file
32 * LICENSE.libmojave for more details.
34 * Author: Jason Hickey
35 * jyh@cs.cornell.edu
37 open Lm_map_sig
39 module MakeTable (Create : TableCreateSig) (Base : TableBaseSig) =
40 struct
41 type elt = Base.elt
42 type data = Base.data
43 type t = (elt, data) Create.t
46 * Get the methods.
48 let methods = Create.create Base.print Base.compare Base.append
51 * Now project them.
53 let empty = methods.empty
54 let is_empty = methods.is_empty
55 let length = methods.cardinal
56 let add = methods.add
57 let replace = methods.replace
58 let union = methods.union
59 let mem = methods.mem
60 let find = methods.find
61 let find_all = methods.find_all
62 let remove = methods.remove
63 let iter = methods.iter
64 let fold_map = methods.fold_map
65 let map = methods.map
66 let deletemax = methods.deletemax
67 let list_of = methods.list_of
68 let print = methods.print
69 end
72 * -*-
73 * Local Variables:
74 * Caml-master: "nl"
75 * End:
76 * -*-