1 (***********************************************************************)
5 (* Kim Nguyen, LRI UMR8623 *)
6 (* Université Paris-Sud & CNRS *)
8 (* Copyright 2010-2013 Université Paris-Sud and Centre National de la *)
9 (* Recherche Scientifique. All rights reserved. This file is *)
10 (* distributed under the terms of the GNU Lesser General Public *)
11 (* License, with the special exception on linking described in file *)
14 (***********************************************************************)
17 type node = Naive_tree.node
18 type cell = { node : node;
22 type t = { mutable length : int;
24 mutable last : cell; }
26 let rec nil = { node = Naive_tree.nil;
29 let create () = { length = 0;
35 if c != nil then begin
43 let length l = l.length
47 let ncell = { node = n;
55 let () = l.last.next <- ncell in
56 { length = l.length + 1;