sig
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 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 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 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 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 split : int -> '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 : ('a -> 'b option) -> 'a list -> 'b option
val find_mapi : (int -> 'a -> 'b option) -> 'a CCList.t -> 'b option
val findi : (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 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
module Idx :
sig
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 : 'a CCList.t -> int -> 'a option
val get_exn : 'a CCList.t -> int -> 'a
val set : 'a CCList.t -> int -> 'a -> 'a CCList.t
val insert : 'a CCList.t -> int -> 'a -> 'a CCList.t
val remove : 'a CCList.t -> int -> 'a CCList.t
end
module Set :
sig
val add : ?eq:('a -> 'a -> bool) -> 'a -> 'a CCList.t -> 'a CCList.t
val remove : ?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
end
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, 'b) CCList.Assoc.t -> 'a -> 'b option
val get_exn :
?eq:('a -> 'a -> bool) -> ('a, 'b) CCList.Assoc.t -> 'a -> 'b
val set :
?eq:('a -> 'a -> bool) ->
('a, 'b) CCList.Assoc.t -> 'a -> 'b -> ('a, 'b) CCList.Assoc.t
val mem :
?eq:('a -> 'a -> bool) -> ('a, 'b) CCList.Assoc.t -> 'a -> bool
val update :
?eq:('a -> 'a -> bool) ->
('a, 'b) CCList.Assoc.t ->
'a -> f:('b option -> 'b option) -> ('a, 'b) CCList.Assoc.t
val remove :
?eq:('a -> 'a -> bool) ->
('a, 'b) CCList.Assoc.t -> 'a -> ('a, 'b) CCList.Assoc.t
end
module Zipper :
sig
type 'a t = 'a list * 'a list
val empty : 'a CCList.Zipper.t
val is_empty : 'a CCList.Zipper.t -> bool
val to_list : 'a CCList.Zipper.t -> 'a list
val to_rev_list : 'a CCList.Zipper.t -> 'a list
val make : 'a list -> 'a CCList.Zipper.t
val left : 'a CCList.Zipper.t -> 'a CCList.Zipper.t
val left_exn : 'a CCList.Zipper.t -> 'a CCList.Zipper.t
val right : 'a CCList.Zipper.t -> 'a CCList.Zipper.t
val right_exn : 'a CCList.Zipper.t -> 'a CCList.Zipper.t
val modify :
('a option -> 'a option) -> 'a CCList.Zipper.t -> 'a CCList.Zipper.t
val insert : 'a -> 'a CCList.Zipper.t -> 'a CCList.Zipper.t
val remove : 'a CCList.Zipper.t -> 'a CCList.Zipper.t
val is_focused : 'a CCList.Zipper.t -> bool
val focused : 'a CCList.Zipper.t -> 'a option
val focused_exn : 'a CCList.Zipper.t -> 'a
val drop_before : 'a CCList.Zipper.t -> 'a CCList.Zipper.t
val drop_after : 'a CCList.Zipper.t -> 'a CCList.Zipper.t
val drop_after_and_focused : 'a CCList.Zipper.t -> 'a CCList.Zipper.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
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 = Buffer.t -> 'a -> unit
type 'a formatter = Format.formatter -> 'a -> unit
type 'a random_gen = Random.State.t -> 'a
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
val print :
?start:string ->
?stop:string ->
?sep:string -> 'a CCList.formatter -> 'a CCList.t CCList.formatter
end