Module Slist (.ml)

module Slist: sig .. end
Messing with lists.

val split_list : int -> 'a list -> 'a list list
split_list len l splits the given list l in a list of lists, each of length len, except eventually the last one.
Author(s): Maxence Guesdon
Version: 1.0
List.split_list
val print_list : Pervasives.out_channel -> ('a -> string) -> 'a list -> unit
print_list out_channel string_of_ele list prints the given list of elements in the given channel, with a newline after each one; string_of_ele is used to get a string from an element.
Author(s): Maxence Guesdon
Version: 1.0
List.print_list
val list_chop : int -> 'a list -> 'a list
list_chop n l returns the n first elements of list l or the whole list if n >= List.length l.
Author(s): Maxence Guesdon
Version: 1.0
List.list_chop
val make_list : int -> 'a -> 'a list
make_list n ele builds a list of n elements ele.
Author(s): Maxence Guesdon
Version: 1.0
List.make_list
val make_int_list : low:int -> high:int -> int list
make_int_list low high builds a list of integers, from low to high.
Author(s): Maxence Guesdon
Version: 1.0
Returns an empty list if low > high.
List.make_int_list
val list_diff : ?pred:('a -> 'a -> bool) -> 'a list -> 'a list -> 'a list
list_diff l1 l2 returns the list l1 - l2.
Author(s): Maxence Guesdon
Version: 1.0
List.list_diff
pred : can be sued to specify the equality predicate (default is (=)).
val list_remove_doubles : ?pred:('a -> 'a -> bool) -> 'a list -> 'a list
list_remove_doubles ?pred l remove doubles in the given list l, according to the optional equality function pred. Default equality function is (=).
Author(s): Maxence Guesdon
Version: 1.0
List.list_remove_doubles