NS.Listinclude module type of ContainersLabels.Listval combine_gen : 'a list -> 'b list -> ('a * 'b) genmodule Ref : sig ... endmodule type MONAD = sig ... endval random : 'a random_gen -> 'a list random_genval random_non_empty : 'a random_gen -> 'a list random_genval random_len : int -> 'a random_gen -> 'a list random_genval random_choose : 'a list -> 'a random_genval random_sequence : 'a random_gen list -> 'a list random_genval to_iter : 'a list -> 'a iterval of_iter : 'a iter -> 'a listval to_gen : 'a list -> 'a genval of_gen : 'a gen -> 'a listmodule Infix : sig ... endinclude Ppx_compare_lib.Comparable.S1 with type 'a t := 'a tval compare :
'a Base__Ppx_compare_lib.compare ->
'a t Base__Ppx_compare_lib.compareinclude Ppx_compare_lib.Equal.S1 with type 'a t := 'a tval equal : 'a Base__Ppx_compare_lib.equal -> 'a t Base__Ppx_compare_lib.equalval pp :
?pre:(unit, Stdlib.Format.formatter, unit, unit) Stdlib.format4 ->
?suf:(unit, Stdlib.Format.formatter, unit, unit) Stdlib.format4 ->
(unit, Stdlib.Format.formatter, unit, unit) Stdlib.format4 ->
(Stdlib.Format.formatter -> 'a -> unit) ->
Stdlib.Format.formatter ->
'a list ->
unitPretty-print a list.
val pp_diff :
cmp:('a -> 'a -> int) ->
?pre:(unit, Stdlib.Format.formatter, unit, unit) Stdlib.format4 ->
?suf:(unit, Stdlib.Format.formatter, unit, unit) Stdlib.format4 ->
(unit, Stdlib.Format.formatter, unit, unit) Stdlib.format4 ->
(Stdlib.Format.formatter -> 'a -> unit) ->
Stdlib.Format.formatter ->
('a list * 'a list) ->
unitval hd : 'a t -> 'a optionval hd_exn : 'a t -> 'aval mem : 'a -> 'a t -> eq:('a -> 'a -> bool) -> boolval iter : 'a t -> f:('a -> unit) -> unitval exists : 'a t -> f:('a -> bool) -> boolval for_all : 'a t -> f:('a -> bool) -> boolval find : 'a t -> f:('a -> bool) -> 'a optionval find_exn : 'a t -> f:('a -> bool) -> 'aval find_map : 'a t -> f:('a -> 'b option) -> 'b optionval find_map_exn : 'a t -> f:('a -> 'b option) -> 'bReturns the input list without the first element equal to the argument, or raise Not_found if no such element exists.
partition xs ~f returns a pair of lists (ts, fs), where ts is the list of all the elements of xs that satisfy the predicate f, and fs is the list of all the elements of xs that do not satisfy f. The order of the elements in the input list is preserved.
partition_map xs ~f returns a pair of lists (ls, rs) such that, for each element x of the input list xs:
f x is Left l, then l is in ls, andf x is Right r, then r is in rs.The output elements are included in ls and rs in the same relative order as the corresponding input elements in xs.
rev_partition_map xs ~f is (rev ls, rev rs) where partition_map xs ~f = (ls, rs). This avoids the rev that partition_map performs.
partition_map_endo xs ~f is equivalent to partition_map xs ~f but specialized to the case where the left and input elements have the same type. Preserves == if f x is Left x for all x in xs.
fold_partition_map is like partition_map but threads an accumulator through the calls to f.
val fold_partition_map_endo :
'a t ->
's ->
f:('a -> 's -> ('a, 'r) Either.t * 's) ->
'a t * 'r t * 'sfold_partition_map_endo xs s ~f is equivalent to fold_partition_map xs s ~f but specialized to the case where the left and input elements have the same type. Preserves == if f x is Left x for all x in xs.
Like map, but specialized to require f to be an endofunction, which enables preserving == if f preserves == of every element.
val rev_map_split : 'a t -> f:('a -> 'b * 'c) -> 'b list * 'c listrev_map_split ~f xs is split (rev_map ~f xs) but more efficient.
val foldi : 'a t -> 's -> f:(int -> 'a -> 's -> 's) -> 'sval reduce : 'a t -> f:('a -> 'a -> 'a) -> 'a optionmodule Assoc : sig ... endval mem_assoc : 'a -> ('a * _) t -> eq:('a -> 'a -> bool) -> bool