Module type Pattern.S

type 'a t
val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
val map : ('a -> 'b) -> 'a t -> 'b t
include Ppx_compare_lib.Comparable.S1 with type 'a t := 'a t
val compare : 'a Base__Ppx_compare_lib.compare -> 'a t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S1 with type 'a t := 'a t
val hash_fold_t : 'a Base__Ppx_hash_lib.hash_fold -> 'a t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S1 with type 'a t := 'a t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> Sexplib0__.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> 'a t -> Sexplib0__.Sexp.t
include Foldable.S with type 'a t := 'a t
val fold_left : f:('b -> 'a -> 'b) -> init:'b -> 'a t -> 'b

Left associative fold of a data structure; this is the same as the function derived from [@@deriving fold] but with labelled arguments

val fold_right : f:('a -> 'b -> 'b) -> init:'b -> 'a t -> 'b

Right associative fold of a data structure

val any : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether any element of the data structure satisfies the supplied predicate. The optional argument init specifies the starting value and defaults to false.

val all : pred:('a -> bool) -> ?init:bool -> 'a t -> bool

Test whether all elements of the the data structure satify the supplied predicate. The optional argument init specifies the starting value and defaults to true.

include Pretty.S1 with type 'a t := 'a t
val pp : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> unit