Module Mylist


module Mylist: sig .. end

List functionalities, extending the standard OCaml library



val split : 'a list -> int -> 'a list * 'a * 'a list
Given a list l and a number i such that 0 <= i < List.length l, returns the triple l1, x, l2 such that x = List.nth l i and l = List.rev l1 @ x :: l2
val replace : 'a -> 'a list -> int -> 'a list
Replace the i-th element of a list
val replace_map : ('a -> 'a) -> 'a list -> int -> 'a list
Replace the i-th element x by f(x)
val position : 'a -> 'a list -> int
Position of an element
val fprintf_list : 'a Useful.fprintf -> 'a list Useful.fprintf
Print a list