(** This module provides some additional functions on lists. *)
val make: 'a -> int -> 'a list
val index_of : 'a -> 'a list -> int
val foldi: (int -> 'a -> 'b -> 'a) -> 'a -> 'b list -> 'a
val iteri: (int -> 'a -> unit) -> 'a list -> unit
val mapi: (int -> 'a -> 'b) -> 'a list -> 'b list
(* [split a i] splits the list a in two lists: one with the elements
up until the [i]th (exclusive) and one with the rest. *)
val split: 'a list -> int -> ('a list * 'a list)
val update_list_assoc: 'a -> 'b -> ('a * 'b) list -> ('a * 'b) list
(* Pasted from Pottier's PP compiler *)
(* [combine] turns a pair of lists into a list of pairs. It never
fails: the length of the output list is the minimum of the lengths
of the input lists. *)
val combine: 'a list -> 'b list -> ('a * 'b) list
(* [subtract xs1 xs2] returns the list [xs1] deprived of as many
elements as there are in the list [xs2]. *)
val subtract: 'a list -> 'b list -> 'a list
(* [mirror] reverses the order of the pair components in a list
of pairs. *)
val mirror: ('a * 'b) list -> ('b * 'a) list
(* [length l] is the length of the list [l]. *)
val length: 'a list -> int32
(* [prefix k xs] returns the prefix of length [k] of the list [xs].
If [xs] has length less than [k], [xs] is returned. *)
val prefix: int -> 'a list -> 'a list
(* [memoize f] produces a memoizing version of the function [f].
It requires the domain of [f] to support generic equality. *)
val memoize: ('a -> 'b) -> ('a -> 'b)
(* [filter_map filter map l] returns the list [l] where elements satisfying the
[filter] function have been replaced by their application to the [map]
function. Elements that do not satisfy [filter] are not in the result
list. *)
val filter_map: ('a -> bool) -> ('a -> 'b) -> 'a list -> 'b list
(* [string_of_list sep f l] returns the string obtained by applying [f] to each
element of [l] and separating their output with [sep]. *)
val string_of_list: string -> ('a -> string) -> 'a list -> string