Implement set-theoretic operation on 2WSATA (union, intersection,
[tatoo.git] / src / hlist_sig.ml
1 (***********************************************************************)
2 (*                                                                     *)
3 (*                               TAToo                                 *)
4 (*                                                                     *)
5 (*                     Kim Nguyen, LRI UMR8623                         *)
6 (*                   Université Paris-Sud & CNRS                       *)
7 (*                                                                     *)
8 (*  Copyright 2010-2012 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   *)
12 (*  ../LICENSE.                                                        *)
13 (*                                                                     *)
14 (***********************************************************************)
15
16 type ('a,'b) node = Nil | Cons of ('a * 'b)
17
18 module type S = sig
19   type elt
20   include Hcons.S
21   val nil : t
22   val cons : ?sorted:bool -> elt -> t -> t
23   val hd : t -> elt
24   val tl : t -> t
25   val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a
26   val map : (elt -> elt) -> t -> t
27   val iter : (elt -> 'a) -> t -> unit
28   val rev : t -> t
29   val rev_map : (elt -> elt) -> t -> t
30   val length : t -> int
31   val mem : elt -> t -> bool
32 end