sig
type 'a sequence = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
type 'a klist = unit -> [ `Cons of 'a * 'a CCList.klist | `Nil ]
type 'a printer = Format.formatter -> 'a -> unit
type 'a random_gen = Random.State.t -> 'a
val length : 'a list -> int
val hd : 'a list -> 'a
val tl : 'a list -> 'a list
val nth : 'a list -> int -> 'a
val rev : 'a list -> 'a list
val rev_append : 'a list -> 'a list -> 'a list
val concat : 'a list list -> 'a list
val iter : ('a -> unit) -> 'a list -> unit
val rev_map : ('a -> 'b) -> 'a list -> 'b list
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b list -> 'a
val iter2 : ('a -> 'b -> unit) -> 'a list -> 'b list -> unit
val map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list
val rev_map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list
val fold_left2 : ('a -> 'b -> 'c -> 'a) -> 'a -> 'b list -> 'c list -> 'a
val fold_right2 : ('a -> 'b -> 'c -> 'c) -> 'a list -> 'b list -> 'c -> 'c
val for_all : ('a -> bool) -> 'a list -> bool
val exists : ('a -> bool) -> 'a list -> bool
val for_all2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool
val exists2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool
val memq : 'a -> 'a list -> bool
val find : ('a -> bool) -> 'a list -> 'a
val find_all : ('a -> bool) -> 'a list -> 'a list
val partition : ('a -> bool) -> 'a list -> 'a list * 'a list
val assoc : 'a -> ('a * 'b) list -> 'b
val assq : 'a -> ('a * 'b) list -> 'b
val mem_assoc : 'a -> ('a * 'b) list -> bool
val mem_assq : 'a -> ('a * 'b) list -> bool
val remove_assoc : 'a -> ('a * 'b) list -> ('a * 'b) list
val remove_assq : 'a -> ('a * 'b) list -> ('a * 'b) list
val sort : ('a -> 'a -> int) -> 'a list -> 'a list
val stable_sort : ('a -> 'a -> int) -> 'a list -> 'a list
val fast_sort : ('a -> 'a -> int) -> 'a list -> 'a list
val merge : ('a -> 'a -> int) -> 'a list -> 'a list -> 'a list
type 'a t = 'a list
val empty : 'a CCList.t
val is_empty : 'a CCList.t -> bool
val map : ('a -> 'b) -> 'a CCList.t -> 'b CCList.t
val ( >|= ) : 'a CCList.t -> ('a -> 'b) -> 'b CCList.t
val cons : 'a -> 'a CCList.t -> 'a CCList.t
val append : 'a CCList.t -> 'a CCList.t -> 'a CCList.t
val cons_maybe : 'a option -> 'a CCList.t -> 'a CCList.t
val ( @ ) : 'a CCList.t -> 'a CCList.t -> 'a CCList.t
val filter : ('a -> bool) -> 'a CCList.t -> 'a CCList.t
val fold_right : ('a -> 'b -> 'b) -> 'a CCList.t -> 'b -> 'b
val fold_while :
('a -> 'b -> 'a * [ `Continue | `Stop ]) -> 'a -> 'b CCList.t -> 'a
val fold_map :
('acc -> 'a -> 'acc * 'b) -> 'acc -> 'a list -> 'acc * 'b list
val scan_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a list -> 'acc list
val fold_map2 :
('acc -> 'a -> 'b -> 'acc * 'c) ->
'acc -> 'a list -> 'b list -> 'acc * 'c list
val fold_filter_map :
('acc -> 'a -> 'acc * 'b option) -> 'acc -> 'a list -> 'acc * 'b list
val fold_flat_map :
('acc -> 'a -> 'acc * 'b list) -> 'acc -> 'a list -> 'acc * 'b list
val init : int -> (int -> 'a) -> 'a CCList.t
val combine : 'a list -> 'b list -> ('a * 'b) list
val combine_gen : 'a list -> 'b list -> ('a * 'b) CCList.gen
val split : ('a * 'b) CCList.t -> 'a CCList.t * 'b CCList.t
val compare : ('a -> 'a -> int) -> 'a CCList.t -> 'a CCList.t -> int
val equal : ('a -> 'a -> bool) -> 'a CCList.t -> 'a CCList.t -> bool
val flat_map : ('a -> 'b CCList.t) -> 'a CCList.t -> 'b CCList.t
val flatten : 'a CCList.t CCList.t -> 'a CCList.t
val product : ('a -> 'b -> 'c) -> 'a CCList.t -> 'b CCList.t -> 'c CCList.t
val fold_product :
('c -> 'a -> 'b -> 'c) -> 'c -> 'a CCList.t -> 'b CCList.t -> 'c
val cartesian_product : 'a CCList.t CCList.t -> 'a CCList.t CCList.t
val map_product_l : ('a -> 'b list) -> 'a list -> 'b list list
val diagonal : 'a CCList.t -> ('a * 'a) CCList.t
val partition_map :
('a -> [< `Drop | `Left of 'b | `Right of 'c ]) ->
'a list -> 'b list * 'c list
val sublists_of_len :
?last:('a list -> 'a list option) ->
?offset:int -> int -> 'a list -> 'a list list
val pure : 'a -> 'a CCList.t
val ( <*> ) : ('a -> 'b) CCList.t -> 'a CCList.t -> 'b CCList.t
val ( <$> ) : ('a -> 'b) -> 'a CCList.t -> 'b CCList.t
val return : 'a -> 'a CCList.t
val ( >>= ) : 'a CCList.t -> ('a -> 'b CCList.t) -> 'b CCList.t
val take : int -> 'a CCList.t -> 'a CCList.t
val drop : int -> 'a CCList.t -> 'a CCList.t
val hd_tl : 'a CCList.t -> 'a * 'a CCList.t
val take_drop : int -> 'a CCList.t -> 'a CCList.t * 'a CCList.t
val take_while : ('a -> bool) -> 'a CCList.t -> 'a CCList.t
val drop_while : ('a -> bool) -> 'a CCList.t -> 'a CCList.t
val take_drop_while :
('a -> bool) -> 'a CCList.t -> 'a CCList.t * 'a CCList.t
val last : int -> 'a CCList.t -> 'a CCList.t
val head_opt : 'a CCList.t -> 'a option
val last_opt : 'a CCList.t -> 'a option
val find_pred : ('a -> bool) -> 'a CCList.t -> 'a option
val find_pred_exn : ('a -> bool) -> 'a CCList.t -> 'a
val find_map : ('a -> 'b option) -> 'a CCList.t -> 'b option
val find_mapi : (int -> 'a -> 'b option) -> 'a CCList.t -> 'b option
val find_idx : ('a -> bool) -> 'a CCList.t -> (int * 'a) option
val remove : ?eq:('a -> 'a -> bool) -> x:'a -> 'a CCList.t -> 'a CCList.t
val filter_map : ('a -> 'b option) -> 'a CCList.t -> 'b CCList.t
val keep_some : 'a option CCList.t -> 'a CCList.t
val keep_ok : ('a, 'b) Result.result CCList.t -> 'a CCList.t
val all_some : 'a option CCList.t -> 'a CCList.t option
val all_ok :
('a, 'err) Result.result CCList.t -> ('a CCList.t, 'err) Result.result
val sorted_merge : ?cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list
val sort_uniq : ?cmp:('a -> 'a -> int) -> 'a list -> 'a list
val sorted_merge_uniq :
?cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list
val is_sorted : ?cmp:('a -> 'a -> int) -> 'a list -> bool
val sorted_insert :
?cmp:('a -> 'a -> int) -> ?uniq:bool -> 'a -> 'a list -> 'a list
val uniq_succ : ?eq:('a -> 'a -> bool) -> 'a list -> 'a list
val group_succ : ?eq:('a -> 'a -> bool) -> 'a list -> 'a list list
val mapi : (int -> 'a -> 'b) -> 'a CCList.t -> 'b CCList.t
val iteri : (int -> 'a -> unit) -> 'a CCList.t -> unit
val foldi : ('b -> int -> 'a -> 'b) -> 'b -> 'a CCList.t -> 'b
val get_at_idx : int -> 'a CCList.t -> 'a option
val get_at_idx_exn : int -> 'a CCList.t -> 'a
val set_at_idx : int -> 'a -> 'a CCList.t -> 'a CCList.t
val insert_at_idx : int -> 'a -> 'a CCList.t -> 'a CCList.t
val remove_at_idx : int -> 'a CCList.t -> 'a CCList.t
val add_nodup : ?eq:('a -> 'a -> bool) -> 'a -> 'a CCList.t -> 'a CCList.t
val remove_one : ?eq:('a -> 'a -> bool) -> 'a -> 'a CCList.t -> 'a CCList.t
val mem : ?eq:('a -> 'a -> bool) -> 'a -> 'a CCList.t -> bool
val subset : ?eq:('a -> 'a -> bool) -> 'a CCList.t -> 'a CCList.t -> bool
val uniq : ?eq:('a -> 'a -> bool) -> 'a CCList.t -> 'a CCList.t
val union :
?eq:('a -> 'a -> bool) -> 'a CCList.t -> 'a CCList.t -> 'a CCList.t
val inter :
?eq:('a -> 'a -> bool) -> 'a CCList.t -> 'a CCList.t -> 'a CCList.t
val range_by : step:int -> int -> int -> int CCList.t
val range : int -> int -> int CCList.t
val range' : int -> int -> int CCList.t
val ( -- ) : int -> int -> int CCList.t
val ( --^ ) : int -> int -> int CCList.t
val replicate : int -> 'a -> 'a CCList.t
val repeat : int -> 'a CCList.t -> 'a CCList.t
module Assoc :
sig
type ('a, 'b) t = ('a * 'b) list
val get :
?eq:('a -> 'a -> bool) -> 'a -> ('a, 'b) CCList.Assoc.t -> 'b option
val get_exn :
?eq:('a -> 'a -> bool) -> 'a -> ('a, 'b) CCList.Assoc.t -> 'b
val set :
?eq:('a -> 'a -> bool) ->
'a -> 'b -> ('a, 'b) CCList.Assoc.t -> ('a, 'b) CCList.Assoc.t
val mem :
?eq:('a -> 'a -> bool) -> 'a -> ('a, 'b) CCList.Assoc.t -> bool
val update :
?eq:('a -> 'a -> bool) ->
f:('b option -> 'b option) ->
'a -> ('a, 'b) CCList.Assoc.t -> ('a, 'b) CCList.Assoc.t
val remove :
?eq:('a -> 'a -> bool) ->
'a -> ('a, 'b) CCList.Assoc.t -> ('a, 'b) CCList.Assoc.t
end
module Ref :
sig
type 'a t = 'a list Pervasives.ref
val push : 'a CCList.Ref.t -> 'a -> unit
val pop : 'a CCList.Ref.t -> 'a option
val pop_exn : 'a CCList.Ref.t -> 'a
val create : unit -> 'a CCList.Ref.t
val clear : 'a CCList.Ref.t -> unit
val lift : ('a list -> 'b) -> 'a CCList.Ref.t -> 'b
val push_list : 'a CCList.Ref.t -> 'a list -> unit
end
module type MONAD =
sig
type 'a t
val return : 'a -> 'a CCList.MONAD.t
val ( >>= ) :
'a CCList.MONAD.t -> ('a -> 'b CCList.MONAD.t) -> 'b CCList.MONAD.t
end
module Traverse :
functor (M : MONAD) ->
sig
val sequence_m : 'a M.t CCList.t -> 'a CCList.t M.t
val fold_m : ('b -> 'a -> 'b M.t) -> 'b -> 'a CCList.t -> 'b M.t
val map_m : ('a -> 'b M.t) -> 'a CCList.t -> 'b CCList.t M.t
val map_m_par : ('a -> 'b M.t) -> 'a CCList.t -> 'b CCList.t M.t
end
val random : 'a CCList.random_gen -> 'a CCList.t CCList.random_gen
val random_non_empty :
'a CCList.random_gen -> 'a CCList.t CCList.random_gen
val random_len :
int -> 'a CCList.random_gen -> 'a CCList.t CCList.random_gen
val random_choose : 'a CCList.t -> 'a CCList.random_gen
val random_sequence :
'a CCList.random_gen CCList.t -> 'a CCList.t CCList.random_gen
val to_seq : 'a CCList.t -> 'a CCList.sequence
val of_seq : 'a CCList.sequence -> 'a CCList.t
val to_gen : 'a CCList.t -> 'a CCList.gen
val of_gen : 'a CCList.gen -> 'a CCList.t
val to_klist : 'a CCList.t -> 'a CCList.klist
val of_klist : 'a CCList.klist -> 'a CCList.t
module Infix :
sig
val ( >|= ) : 'a CCList.t -> ('a -> 'b) -> 'b CCList.t
val ( @ ) : 'a CCList.t -> 'a CCList.t -> 'a CCList.t
val ( <*> ) : ('a -> 'b) CCList.t -> 'a CCList.t -> 'b CCList.t
val ( <$> ) : ('a -> 'b) -> 'a CCList.t -> 'b CCList.t
val ( >>= ) : 'a CCList.t -> ('a -> 'b CCList.t) -> 'b CCList.t
val ( -- ) : int -> int -> int CCList.t
val ( --^ ) : int -> int -> int CCList.t
end
val pp :
?start:string ->
?stop:string ->
?sep:string -> 'a CCList.printer -> 'a CCList.t CCList.printer
end