Initial snarf.
[shack.git] / libmojave / util / lm_dlist.mli
blobdd8c4d34a0e77b999c298d455a8f033839354745
1 (*
2 * Doubly-linked lists.
4 * ----------------------------------------------------------------
6 * @begin[license]
7 * Copyright (C) 2001-2005 Mojave Group, Caltech
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation,
12 * version 2.1 of the License.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 * Additional permission is given to link this library with the
24 * OpenSSL project's "OpenSSL" library, and with the OCaml runtime,
25 * and you may distribute the linked executables. See the file
26 * LICENSE.libmojave for more details.
28 * Author: Jason Hickey
29 * @email{jyh@cs.caltech.edu}
30 * @end[license]
34 * Lists contain handles.
36 type 'a t
37 type 'a handle
40 * Creation.
42 val create : unit -> 'a t
43 val create_handle : 'a -> 'a handle
44 val data : 'a handle -> 'a
47 * List operations.
49 val is_empty : 'a t -> bool
50 val hd : 'a t -> 'a handle
51 val tl : 'a handle -> 'a handle
52 val no_tl : 'a handle -> bool
53 val to_list : 'a t -> 'a handle list
56 * Standard ops.
58 val length : 'a t -> int
61 * Iteration.
63 val iter : ('a handle -> unit) -> 'a t -> unit
64 val fold : ('a -> 'b handle -> 'a) -> 'a -> 'b t -> 'a
67 * Insertion/deletion.
69 val insert : 'a handle -> 'a t -> unit
70 val delete : 'a handle -> unit
72 (*!
73 * @docoff
75 * -*-
76 * Local Variables:
77 * Caml-master: "compile"
78 * End:
79 * -*-