Module Kxclib.List

include module type of Stdlib.List
type !'a t = 'a list =
  1. | []
  2. | :: of 'a * 'a list
val length : 'a list -> int
val compare_lengths : 'a list -> 'b list -> int
val compare_length_with : 'a list -> int -> int
val is_empty : 'a list -> bool
val cons : 'a -> 'a list -> 'a list
val nth : 'a list -> int -> 'a
val nth_opt : 'a list -> int -> 'a option
val rev : 'a list -> 'a list
val init : int -> (int -> 'a) -> 'a list
val append : 'a list -> 'a list -> 'a list
val rev_append : 'a list -> 'a list -> 'a list
val concat : 'a list list -> 'a list
val flatten : 'a list list -> 'a list
val equal : ('a -> 'a -> bool) -> 'a list -> 'a list -> bool
val compare : ('a -> 'a -> int) -> 'a list -> 'a list -> int
val iter : ('a -> unit) -> 'a list -> unit
val iteri : (int -> 'a -> unit) -> 'a list -> unit
val map : ('a -> 'b) -> 'a list -> 'b list
val mapi : (int -> 'a -> 'b) -> 'a list -> 'b list
val rev_map : ('a -> 'b) -> 'a list -> 'b list
val filter_map : ('a -> 'b option) -> 'a list -> 'b list
val concat_map : ('a -> 'b list) -> 'a list -> 'b list
val fold_left_map : ('acc -> 'a -> 'acc * 'b) -> 'acc -> 'a list -> 'acc * 'b list
val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a list -> 'acc
val fold_right : ('a -> 'acc -> 'acc) -> 'a list -> 'acc -> 'acc
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 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a list -> 'b list -> 'acc
val fold_right2 : ('a -> 'b -> 'acc -> 'acc) -> 'a list -> 'b list -> 'acc -> 'acc
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 mem : 'a -> 'a list -> bool
val memq : 'a -> 'a list -> bool
val find : ('a -> bool) -> 'a list -> 'a
val find_opt : ('a -> bool) -> 'a list -> 'a option
val find_index : ('a -> bool) -> 'a list -> int option
val find_map : ('a -> 'b option) -> 'a list -> 'b option
val find_mapi : (int -> 'a -> 'b option) -> 'a list -> 'b option
val filter : ('a -> bool) -> 'a list -> 'a list
val find_all : ('a -> bool) -> 'a list -> 'a list
val partition : ('a -> bool) -> 'a list -> 'a list * 'a list
val partition_map : ('a -> ('b, 'c) Stdlib.Either.t) -> 'a list -> 'b list * 'c list
val assoc : 'a -> ('a * 'b) list -> 'b
val assoc_opt : 'a -> ('a * 'b) list -> 'b option
val assq : 'a -> ('a * 'b) list -> 'b
val assq_opt : 'a -> ('a * 'b) list -> 'b option
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 split : ('a * 'b) list -> 'a list * 'b list
val combine : 'a list -> '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 sort_uniq : ('a -> 'a -> int) -> 'a list -> 'a list
val merge : ('a -> 'a -> int) -> 'a list -> 'a list -> 'a list
val to_seq : 'a list -> 'a Stdlib.Seq.t
val of_seq : 'a Stdlib.Seq.t -> 'a list
include Monadic with type 'x t := 'x t
val return : 'x -> 'x t
val bind : 'x t -> ('x -> 'y t) -> 'y t
module Ops_monad : MonadOpsS with type 'x t := 'x t
module Ops_piping : PipeOpsS with type 'x pipeable := 'x t
module Ops : sig ... end
val conj : 'x -> 'x list -> 'x list

conj x xs append x as the last element of xs

val conj_rev : 'x -> 'x list -> 'x list

conj_rev x xs' is the equiv of conj x (List.rev xs')

val iota : int -> int t
val iota1 : int -> int t
val range : ?include_endpoint:bool -> int -> int -> int Stdlib.List.t
val dedup' : by:('a -> 'b) -> 'a Stdlib.List.t -> 'a Stdlib.List.t
val dedup : 'a Stdlib.List.t -> 'a Stdlib.List.t
val update_assoc : 'k -> ('v option -> 'v option) -> ('k * 'v) list -> ('k * 'v) list
val update_assq : 'k -> ('v option -> 'v option) -> ('k * 'v) list -> ('k * 'v) list
val deassoc_opt : 'k -> ('k * 'v) list -> 'v option * ('k * 'v) list

deassoc_opt k l removes entry keyed k from l, interpreted as an association list, and return v, l' where v is the value of the entry being removed or None, and l' is the list after the removal, or semantically unchanged if the key does not exist. note that entries in l' may differ in order wrt. l.

if there are multiple entries keyed k, v will be Some _ and l' will differ from the original, but otherwise the behavior is unspecified

val deassoc_opt' : 'k -> ('k * 'v) list -> ('v * ('k * 'v) list) option

same as deassoc_opt but different return type

val deassq_opt : 'k -> ('k * 'v) list -> 'v option * ('k * 'v) list

same as deassoc_opt except using (==) when comparing keys

val deassq_opt' : 'k -> ('k * 'v) list -> ('v * ('k * 'v) list) option

same as deassq_opt but different return type

val deassoc : 'k -> ('k * 'v) list -> 'v * ('k * 'v) list

same as deassoc_opt but raises Not_found when the requested key does not exist

val deassq : 'k -> ('k * 'v) list -> 'v * ('k * 'v) list

same as deassq_opt but raises Not_found when the requested key does not exist

val group_by : ('x -> 'k) -> 'x t -> ('k * 'x t) t
val unzip : ('a * 'b) list -> 'a t * 'b t
val unzip3 : ('a * 'b * 'c) list -> 'a t * 'b t * 'c t
val reduce : ('a -> 'a -> 'a) -> 'a t -> 'a

raises Not_found if empty list; see also reduce_opt

val reduce_opt : ('a -> 'a -> 'a) -> 'a t -> 'a option

return None if empty list; see also reduce

val min_opt : ('a -> 'a -> int) -> 'a t -> 'a option
val max_opt : ('a -> 'a -> int) -> 'a t -> 'a option
val min : ('a -> 'a -> int) -> 'a t -> 'a
val max : ('a -> 'a -> int) -> 'a t -> 'a
val foldl : ('a -> 'b -> 'a) -> 'a -> 'b list -> 'a
val foldr : ('a -> 'b -> 'b) -> 'b -> 'a list -> 'b
val make : int -> 'a -> 'a list
val hd : 'a t -> 'a

raises Not_found if empty list

val tl : 'a t -> 'a list

raises Not_found if empty list

val take : int -> 'a t -> 'a list

raises Not_found if empty list

val drop : int -> 'a t -> 'a t

raises Not_found if empty list

val count : ('a -> bool) -> 'a list -> int

pred list returns the number of elements e in list that satisfies pred

val last : 'a list -> 'a

last element of list; raises Not_found if empty list

val and_last : 'x list -> 'x list * 'x

last element and rest of a list; raises Not_found if empty list

val iter' : ('a -> unit) -> ('a -> unit) -> 'a t -> unit
val fmap : ('x -> 'y list) -> 'x list -> 'y list
val interpolate : 'a -> 'a t -> 'a list
val filteri : (int -> 'a -> bool) -> 'a t -> 'a list
val empty : 'a t -> bool
val to_function : 'a list -> int -> 'a
val to_hashtbl : ('k * 'v) list -> ('k, 'v) Stdlib.Hashtbl.t
val pp : ?sep:string -> ?parens:(string * string) -> (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a list -> unit