Module LibTools

General functions

val map_opt : ('a -> 'b) -> 'a option -> 'b option
val iter_opt : ('a -> unit) -> 'a option -> unit
val from_opt : 'a option -> 'a -> 'a
val from_opt' : 'a option -> (unit -> 'a) -> 'a
val remember_first : 'a option Stdlib.ref -> 'a -> unit
val map_snd : ('a -> 'b) -> ('c * 'a) list -> ('c * 'b) list
val assoc_gen : ('a -> 'a -> bool) -> 'a -> ('a * 'b) list -> 'b
val list_ref_iter : ('a -> unit) -> 'a list Stdlib.ref -> unit

iteration over a reference on list. list_ref_iter fn r ensure that fn has been called on all initial elements of !r and all elements that are member on !r at the end of the call.

module Bindlib : sig ... end
val print_list : (Stdlib.Format.formatter -> 'a -> unit) -> string -> Stdlib.Format.formatter -> 'a list -> unit

list printing

val print_array : (Stdlib.Format.formatter -> 'a -> unit) -> string -> Stdlib.Format.formatter -> 'a array -> unit

array printing

val print_strlist : string -> Stdlib.Format.formatter -> string list -> unit
val print_strarray : string -> Stdlib.Format.formatter -> string array -> unit
val clear : unit -> unit

clear the terminal