`sig
type +'a t
type 'a sequence = 'a Sequence.t
val mem : ?equal:('a -> 'a -> bool) -> 'a t -> 'a -> bool
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold : 'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t
val ( >>| ) : 'a t -> ('a -> 'b) -> 'b t
module Monad_infix :
sig
val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t
val ( >>| ) : 'a t -> ('a -> 'b) -> 'b t
end
val bind : 'a t -> ('a -> 'b t) -> 'b t
val return : 'a -> 'a t
val map : 'a t -> f:('a -> 'b) -> 'b t
val join : 'a t t -> 'a t
val ignore_m : 'a t -> unit t
val all : 'a t list -> 'a list t
val all_ignore : unit t list -> unit t
val empty : 'a Sequence.t
val next : 'a Sequence.t -> ('a * 'a Sequence.t) option
module Step :
sig
type ('a, 's) t = Done | Skip of 's | Yield of 'a * 's
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
('s -> Sexplib.Sexp.t) -> ('a, 's) Sequence.Step.t -> Sexplib.Sexp.t
end
val unfold_step :
init:'s -> f:('s -> ('a, 's) Sequence.Step.t) -> 'a Sequence.t
val unfold : init:'s -> f:('s -> ('a * 's) option) -> 'a Sequence.t
val unfold_with :
'a Sequence.t ->
init:'s -> f:('s -> 'a -> ('b, 's) Sequence.Step.t) -> 'b Sequence.t
val unfold_with_and_finish :
'a Sequence.t ->
init:'s_a ->
running_step:('s_a -> 'a -> ('b, 's_a) Sequence.Step.t) ->
inner_finished:('s_a -> 's_b) ->
finishing_step:('s_b -> ('b, 's_b) Sequence.Step.t) -> 'b Sequence.t
val nth : 'a Sequence.t -> int -> 'a option
val nth_exn : 'a Sequence.t -> int -> 'a
val mapi : 'a Sequence.t -> f:(int -> 'a -> 'b) -> 'b Sequence.t
val filteri : 'a Sequence.t -> f:(int -> 'a -> bool) -> 'a Sequence.t
val filter : 'a Sequence.t -> f:('a -> bool) -> 'a Sequence.t
val merge :
'a Sequence.t -> 'a Sequence.t -> cmp:('a -> 'a -> int) -> 'a Sequence.t
val hd : 'a Sequence.t -> 'a option
val hd_exn : 'a Sequence.t -> 'a
val tl : 'a Sequence.t -> 'a Sequence.t option
val tl_eagerly_exn : 'a Sequence.t -> 'a Sequence.t
val findi : 'a Sequence.t -> f:(int -> 'a -> bool) -> (int * 'a) option
val find_exn : 'a Sequence.t -> f:('a -> bool) -> 'a
val append : 'a Sequence.t -> 'a Sequence.t -> 'a Sequence.t
val concat : 'a Sequence.t Sequence.t -> 'a Sequence.t
val concat_map : 'a Sequence.t -> f:('a -> 'b Sequence.t) -> 'b Sequence.t
val concat_mapi :
'a Sequence.t -> f:(int -> 'a -> 'b Sequence.t) -> 'b Sequence.t
val interleave : 'a Sequence.t Sequence.t -> 'a Sequence.t
val zip : 'a Sequence.t -> 'b Sequence.t -> ('a * 'b) Sequence.t
val zip_full :
'a Sequence.t ->
'b Sequence.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] Sequence.t
val iteri : 'a Sequence.t -> f:(int -> 'a -> unit) -> unit
val foldi : 'a Sequence.t -> f:(int -> 'b -> 'a -> 'b) -> init:'b -> 'b
val reduce_exn : 'a Sequence.t -> f:('a -> 'a -> 'a) -> 'a
val reduce : 'a Sequence.t -> f:('a -> 'a -> 'a) -> 'a option
val find_consecutive_duplicate :
'a Sequence.t -> equal:('a -> 'a -> bool) -> ('a * 'a) option
val remove_consecutive_duplicates :
'a Sequence.t -> equal:('a -> 'a -> bool) -> 'a Sequence.t
val range :
?stride:int ->
?start:[ `exclusive | `inclusive ] ->
?stop:[ `exclusive | `inclusive ] -> int -> int -> int Sequence.t
val init : int -> f:(int -> 'a) -> 'a Sequence.t
val filter_map : 'a Sequence.t -> f:('a -> 'b option) -> 'b Sequence.t
val filter_mapi :
'a Sequence.t -> f:(int -> 'a -> 'b option) -> 'b Sequence.t
val filter_opt : 'a option Sequence.t -> 'a Sequence.t
val sub : 'a Sequence.t -> pos:int -> len:int -> 'a Sequence.t
val take : 'a Sequence.t -> int -> 'a Sequence.t
val drop : 'a Sequence.t -> int -> 'a Sequence.t
val drop_eagerly : 'a Sequence.t -> int -> 'a Sequence.t
val take_while : 'a Sequence.t -> f:('a -> bool) -> 'a Sequence.t
val drop_while : 'a Sequence.t -> f:('a -> bool) -> 'a Sequence.t
val drop_while_option :
'a Sequence.t -> f:('a -> bool) -> ('a * 'a Sequence.t) option
val split_n_eagerly : 'a Sequence.t -> int -> 'a Sequence.t * 'a Sequence.t
val shift_right : 'a Sequence.t -> 'a -> 'a Sequence.t
val shift_right_with_list : 'a Sequence.t -> 'a list -> 'a Sequence.t
val shift_left : 'a Sequence.t -> int -> 'a Sequence.t
module Infix :
sig val ( @ ) : 'a Sequence.t -> 'a Sequence.t -> 'a Sequence.t end
val cartesian_product :
'a Sequence.t -> 'b Sequence.t -> ('a * 'b) Sequence.t
val interleaved_cartesian_product :
'a Sequence.t -> 'b Sequence.t -> ('a * 'b) Sequence.t
val intersperse : 'a Sequence.t -> sep:'a -> 'a Sequence.t
val cycle_list_exn : 'a list -> 'a Sequence.t
val repeat : 'a -> 'a Sequence.t
val singleton : 'a -> 'a Sequence.t
val delayed_fold :
'a Sequence.t ->
init:'s -> f:('s -> 'a -> k:('s -> 'r) -> 'r) -> finish:('s -> 'r) -> 'r
val to_list : 'a Sequence.t -> 'a list
val to_list_rev : 'a Sequence.t -> 'a list
val of_list : 'a list -> 'a Sequence.t
val memoize : 'a Sequence.t -> 'a Sequence.t
val force_eagerly : 'a Sequence.t -> 'a Sequence.t
val bounded_length :
'a Sequence.t -> at_most:int -> [ `Greater | `Is of int ]
val length_is_bounded_by : ?min:int -> ?max:int -> 'a Sequence.t -> bool
module Generator :
sig
type ('a, 'e) t
val ( >>= ) : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t
val ( >>| ) : ('a, 'e) t -> ('a -> 'b) -> ('b, 'e) t
module Monad_infix :
sig
val ( >>= ) : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t
val ( >>| ) : ('a, 'e) t -> ('a -> 'b) -> ('b, 'e) t
end
val bind : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t
val return : 'a -> ('a, 'b) t
val map : ('a, 'e) t -> f:('a -> 'b) -> ('b, 'e) t
val join : (('a, 'e) t, 'e) t -> ('a, 'e) t
val ignore_m : ('a, 'e) t -> (unit, 'e) t
val all : ('a, 'e) t list -> ('a list, 'e) t
val all_ignore : (unit, 'e) t list -> (unit, 'e) t
val yield : 'elt -> (unit, 'elt) Sequence.t
val run : (unit, 'elt) Sequence.t -> 'elt Sequence.sequence
end
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a Sequence.t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a Sequence.t -> 'a Sequence.t -> int
end`