227768c17241e5ad2c4a31e2f3d5429d9aecf393
[tatoo.git] / src / utils / 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 (*
17   Time-stamp: <Last modified on 2013-03-13 18:21:28 CET by Kim Nguyen>
18 *)
19 type ('a,'b) node = Nil | Cons of ('a * 'b)
20
21 module type S = sig
22   type elt
23   include Hcons.S
24   val nil : t
25   val cons : ?sorted:bool -> elt -> t -> t
26   val hd : t -> elt
27   val tl : t -> t
28   val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a
29   val map : (elt -> elt) -> t -> t
30   val iter : (elt -> 'a) -> t -> unit
31   val rev : t -> t
32   val rev_map : (elt -> elt) -> t -> t
33   val length : t -> int
34   val mem : elt -> t -> bool
35 end