sig
  module type S =
    sig
      type ordering = PreOrder | InOrder | PostOrder
      type direction_ =
          Ascending of Reins.TreeSetIterator.S.ordering
        | Descending of Reins.TreeSetIterator.S.ordering
      type 'a t
      type 'a elt
      type 'a cursor
      type 'a collection
      type direction = direction_
      type 'a traversal =
          Traverse_All
        | Traverse_If of ('-> bool)
        | Traverse_While of ('-> bool)
      val create : direction -> 'a elt traversal -> 'a collection -> 'a t
      val from_cursor : direction -> 'a elt traversal -> 'a cursor -> 'a t
      val value : 'a t -> 'a elt option
      val get_value : 'a t -> 'a elt
      val at_end : 'a t -> bool
      val at_beg : 'a t -> bool
      val has_next : 'a t -> bool
      val next : 'a t -> 'a t
      val has_prev : 'a t -> bool
      val prev : 'a t -> 'a t
      val goto_beg : 'a t -> 'a t
      val goto_end : 'a t -> 'a t
      val flip : 'a t -> 'a t
      val iter : ('a elt -> unit) -> 'a t -> unit
      val fold : ('-> 'b elt -> 'a) -> '-> 'b t -> 'a
    end
  module Make :
    functor (T : Sets.Set_->
      sig
        type ordering = PreOrder | InOrder | PostOrder
        type direction_ = Ascending of ordering | Descending of ordering
        type 'a t
        type 'a elt = 'T.elt_
        type 'a cursor = 'T.cursor_
        type 'a collection = 'T.set
        type direction = direction_
        type 'a traversal =
            Traverse_All
          | Traverse_If of ('-> bool)
          | Traverse_While of ('-> bool)
        val create : direction -> 'a elt traversal -> 'a collection -> 'a t
        val from_cursor : direction -> 'a elt traversal -> 'a cursor -> 'a t
        val value : 'a t -> 'a elt option
        val get_value : 'a t -> 'a elt
        val at_end : 'a t -> bool
        val at_beg : 'a t -> bool
        val has_next : 'a t -> bool
        val next : 'a t -> 'a t
        val has_prev : 'a t -> bool
        val prev : 'a t -> 'a t
        val goto_beg : 'a t -> 'a t
        val goto_end : 'a t -> 'a t
        val flip : 'a t -> 'a t
        val iter : ('a elt -> unit) -> 'a t -> unit
        val fold : ('-> 'b elt -> 'a) -> '-> 'b t -> 'a
      end
end