Kxclib.List
include module type of Stdlib.List
module Ops_piping : PipeOpsS with type 'x pipeable := 'x t
module Ops : sig ... end
val iota : int -> int t
val iota1 : int -> int t
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
same as deassoc_opt
but different return type
same as deassoc_opt
except using (==)
when comparing keys
same as deassq_opt
but different return type
same as deassoc_opt
but raises Not_found
when the requested key does not exist
same as deassq_opt
but raises Not_found
when the requested key does not exist
val reduce : ('a -> 'a -> 'a) -> 'a t -> 'a
raises Not_found
if empty list; see also reduce_opt
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 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
pred list
returns the number of elements e
in list
that satisfies pred
last element and rest of a list; raises Not_found
if empty list
val iter' : ('a -> unit) -> ('a -> unit) -> 'a t -> unit
val interpolate : 'a -> 'a t -> 'a list
val filteri : (int -> 'a -> bool) -> 'a t -> 'a list
val empty : 'a t -> bool