# Module BatPSet

    module BatPSet: sig .. end

Polymorphic sets

The functions below are now integrated as part of the `BatSet` module. Please go there to find detailed documentation.

    type 'a t

    include BatEnum.Enumerable

    include BatInterfaces.Mappable

    val empty : 'a t

    val create : ('a -> 'a -> int) -> 'a t

    val singleton : ?cmp:('a -> 'a -> int) -> 'a -> 'a t

    val is_empty : 'a t -> bool

    val mem : 'a -> 'a t -> bool

    val add : 'a -> 'a t -> 'a t

    val remove : 'a -> 'a t -> 'a t

    val iter : ('a -> unit) -> 'a t -> unit

    val map : ('a -> 'a) -> 'a t -> 'a t

    val filter : ('a -> bool) -> 'a t -> 'a t

    val filter_map : ('a -> 'b option) -> 'a t -> 'b t

    val fold : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b

    val exists : ('a -> bool) -> 'a t -> bool

    val cardinal : 'a t -> int

    val choose : 'a t -> 'a

    val min_elt : 'a t -> 'a

    val max_elt : 'a t -> 'a

    val enum : 'a t -> 'a BatEnum.t

    val of_enum : 'a BatEnum.t -> 'a t

    val of_enum_cmp : cmp:('a -> 'a -> int) -> 'a BatEnum.t -> 'a t

    val of_list : 'a list -> 'a t

    val for_all : ('a -> bool) -> 'a t -> bool

    val partition : ('a -> bool) -> 'a t -> 'a t * 'a t

    val split : 'a -> 'a t -> 'a t * bool * 'a t

    val filter : ('a -> bool) -> 'a t -> 'a t

    val pop : 'a t -> 'a * 'a t

    val union : 'a t -> 'a t -> 'a t

    val diff : 'a t -> 'a t -> 'a t

    val intersect : 'a t -> 'a t -> 'a t

    val subset : 'a t -> 'a t -> bool

    val print : ?first:string ->
           ?last:string ->
           ?sep:string ->
           ('a BatInnerIO.output -> 'b -> unit) ->
           'a BatInnerIO.output -> 'b t -> unit