module CCListLabels:sig..end
include ListLabels
type'at ='a list
val empty : 'a t
val is_empty : 'a t -> boolis_empty l returns true iff l = []val map : f:('a -> 'b) -> 'a t -> 'b tval (>|=) : 'a t -> ('a -> 'b) -> 'b tmap with reversed argumentsval cons : 'a -> 'a t -> 'a tcons x l is x::lval append : 'a t -> 'a t -> 'a tval cons_maybe : 'a option -> 'a t -> 'a tcons_maybe (Some x) l is x :: l
cons_maybe None l is lval (@) : 'a t -> 'a t -> 'a t
val filter : f:('a -> bool) -> 'a t -> 'a tList.filterval fold_right : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'bfold_rightval fold_while : f:('a -> 'b -> 'a * [ `Continue | `Stop ]) ->
init:'a -> 'b t -> 'a('a, `Stop) is
indicated by the accumulatorval fold_map : f:('acc -> 'a -> 'acc * 'b) -> init:'acc -> 'a list -> 'acc * 'b listfold_map f acc l is a fold_left-like function, but it also maps the
list to another list.val fold_map2 : f:('acc -> 'a -> 'b -> 'acc * 'c) ->
init:'acc -> 'a list -> 'b list -> 'acc * 'c listfold_map2 is to fold_map what List.map2 is to List.map.Invalid_argument if the lists do not have the same lengthval fold_filter_map : f:('acc -> 'a -> 'acc * 'b option) -> init:'acc -> 'a list -> 'acc * 'b listfold_filter_map f acc l is a fold_left-like function, but also
generates a list of output in a way similar to CCListLabels.filter_mapval fold_flat_map : f:('acc -> 'a -> 'acc * 'b list) -> init:'acc -> 'a list -> 'acc * 'b listfold_flat_map f acc l is a fold_left-like function, but it also maps the
list to a list of lists that is then flatten'd..val init : int -> f:(int -> 'a) -> 'a tArray.initval compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val flat_map : f:('a -> 'b t) -> 'a t -> 'b tval flatten : 'a t t -> 'a tval product : f:('a -> 'b -> 'c) ->
'a t -> 'b t -> 'c tval fold_product : f:('c -> 'a -> 'b -> 'c) ->
init:'c -> 'a t -> 'b t -> 'cval diagonal : 'a t -> ('a * 'a) tlist_diagonal l will
return the list of List.nth i l, List.nth j l if i < j.val partition_map : f:('a -> [< `Drop | `Left of 'b | `Right of 'c ]) ->
'a list -> 'b list * 'c listpartition_map f l maps f on l and gather results in lists:f x = `Left y, adds y to the first listf x = `Right z, adds z to the second listf x = `Drop, ignores xval pure : 'a -> 'a t
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
val (<$>) : ('a -> 'b) -> 'a t -> 'b t
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val take : int -> 'a t -> 'a tn first elements, drop the restval drop : int -> 'a t -> 'a tn first elements, keep the restval hd_tl : 'a t -> 'a * 'a thd_tl (x :: l) returns hd, l.Failure if the list is emptyval take_drop : int -> 'a t -> 'a t * 'a ttake_drop n l returns l1, l2 such that l1 @ l2 = l and
length l1 = min (length l) nval take_while : f:('a -> bool) -> 'a t -> 'a tval drop_while : f:('a -> bool) -> 'a t -> 'a tval last : int -> 'a t -> 'a tlast n l takes the last n elements of l (or less if
l doesn't have that many elementsval head_opt : 'a t -> 'a optionval last_opt : 'a t -> 'a optionval find_pred : f:('a -> bool) -> 'a t -> 'a optionfind_pred p l finds the first element of l that satisfies p,
or returns None if no element satisfies pval find_pred_exn : f:('a -> bool) -> 'a t -> 'a
val find_map : f:('a -> 'b option) -> 'a t -> 'b optionfind_map f l traverses l, applying f to each element. If for
some element x, f x = Some y, then Some y is returned. Otherwise
the call returns Noneval find_mapi : f:(int -> 'a -> 'b option) -> 'a t -> 'b option
val find_idx : f:('a -> bool) -> 'a t -> (int * 'a) optionfind_idx p x returns Some (i,x) where x is the i-th element of l,
and p x holds. Otherwise returns Noneval remove : ?eq:('a -> 'a -> bool) -> key:'a -> 'a t -> 'a tremove ~key l removes every instance of key from l. Tailrec.eq : equality functionval filter_map : f:('a -> 'b option) -> 'a t -> 'b tval sorted_merge : ?cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a listval sort_uniq : ?cmp:('a -> 'a -> int) -> 'a list -> 'a listval sorted_merge_uniq : ?cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a listsorted_merge_uniq l1 l2 merges the sorted lists l1 and l2 and
removes duplicatesval is_sorted : ?cmp:('a -> 'a -> int) -> 'a list -> boolis_sorted l returns true iff l is sorted (according to given order)cmp : the comparison function (default Pervasives.compare)val sorted_insert : ?cmp:('a -> 'a -> int) -> ?uniq:bool -> 'a -> 'a list -> 'a listsorted_insert x l inserts x into l such that, if l was sorted,
then sorted_insert x l is sorted too.uniq : if true and x is already in sorted position in l, then
x is not duplicated. Default false (x will be inserted in any case).val uniq_succ : ?eq:('a -> 'a -> bool) -> 'a list -> 'a listuniq_succ l removes duplicate elements that occur one next to the other.
Examples:
uniq_succ [1;2;1] = [1;2;1]
uniq_succ [1;1;2] = [1;2]val group_succ : ?eq:('a -> 'a -> bool) -> 'a list -> 'a list listgroup_succ ~eq l groups together consecutive elements that are equal
according to eqval mapi : f:(int -> 'a -> 'b) -> 'a t -> 'b t
val iteri : f:(int -> 'a -> unit) -> 'a t -> unit
val foldi : f:('b -> int -> 'a -> 'b) -> init:'b -> 'a t -> 'bval get_at_idx : int -> 'a t -> 'a option
val get_at_idx_exn : int -> 'a t -> 'aNot_found if the index is invalidval set_at_idx : int -> 'a -> 'a t -> 'a tval insert_at_idx : int -> 'a -> 'a t -> 'a tval remove_at_idx : int -> 'a t -> 'a t
Those operations maintain the invariant that the list does not
contain duplicates (if it already satisfies it)
val add_nodup : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> 'a tadd_nodup x set adds x to set if it was not already present. Linear time.val remove_one : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> 'a tremove_one x set removes one occurrence of x from set. Linear time.val mem : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> boolval subset : ?eq:('a -> 'a -> bool) -> 'a t -> 'a t -> boolval uniq : ?eq:('a -> 'a -> bool) -> 'a t -> 'a tCCListLabels.sort_uniqval union : ?eq:('a -> 'a -> bool) ->
'a t -> 'a t -> 'a tval inter : ?eq:('a -> 'a -> bool) ->
'a t -> 'a t -> 'a tval range_by : step:int -> int -> int -> int trange_by ~step i j iterates on integers from i to j included,
where the difference between successive elements is step.
use a negative step for a decreasing list.Invalid_argument if step=0val range : int -> int -> int trange i j iterates on integers from i to j included . It works
both for decreasing and increasing rangesval range' : int -> int -> int t
val (--) : int -> int -> int trangeval (--^) : int -> int -> int trange'val replicate : int -> 'a -> 'a tn timesval repeat : int -> 'a t -> 'a tn timesmodule Assoc:sig..end
module Ref:sig..end
module type MONAD =sig..end
module Traverse(M:MONAD):sig..end
type'asequence =('a -> unit) -> unit
type'agen =unit -> 'a option
type'aklist =unit -> [ `Cons of 'a * 'a klist | `Nil ]
type'aprinter =Format.formatter -> 'a -> unit
type'arandom_gen =Random.State.t -> 'a
val random : 'a random_gen -> 'a t random_gen
val random_non_empty : 'a random_gen -> 'a t random_gen
val random_len : int ->
'a random_gen -> 'a t random_gen
val random_choose : 'a t -> 'a random_genNot_found if the list is emptyval random_sequence : 'a random_gen t ->
'a t random_gen
val to_seq : 'a t -> 'a sequence
val of_seq : 'a sequence -> 'a t
val to_gen : 'a t -> 'a gen
val of_gen : 'a gen -> 'a t
val to_klist : 'a t -> 'a klist
val of_klist : 'a klist -> 'a topen CCList.Infix to access the infix operators
without cluttering the scope too much.module Infix:sig..end
val pp : ?start:string ->
?stop:string ->
?sep:string ->
'a printer -> 'a t printer