Add fold_left/right functions to the set interface (iterate in
[tatoo.git] / src / common_sig.ml
index 37437e4..0e53b92 100644 (file)
 (*                                                                     *)
 (***********************************************************************)
 
-(*
-  Time-stamp: <Last modified on 2013-03-04 23:01:55 CET by Kim Nguyen>
-*)
-
 (** Type equipped with an equality and hash function.
     If [equal a b] then [(hash a) = (hash b)]
 *)
@@ -92,6 +88,8 @@ sig
   val subset : t -> t -> bool
   val iter : (elt -> unit) -> t -> unit
   val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a
+  val fold_left : (elt -> 'a -> 'a) -> t -> 'a -> 'a
+  val fold_right : (elt -> 'a -> 'a) -> t -> 'a -> 'a
   val for_all : (elt -> bool) -> t -> bool
   val exists : (elt -> bool) -> t -> bool
   val filter : (elt -> bool) -> t -> t