module type MISC = sig
.. end
val opt_print : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a option -> unit
val the : 'a option -> 'a
val getenv : ?default:string -> string -> string
val with_input_file : ?bin:bool -> string -> (Pervasives.in_channel -> 'a) -> 'a
val with_output_file : ?bin:bool -> string -> (Pervasives.out_channel -> 'a) -> 'a
val with_temp_file : string -> string -> (string -> 'a) -> 'a
val read_file : string -> string
val copy_chan : Pervasives.in_channel -> Pervasives.out_channel -> unit
val copy_file : string -> string -> unit
val print_string_list : Format.formatter -> string list -> unit
val (!*) : 'a Lazy.t -> 'a
A shortcut to force lazy value (See ).
val (&) : ('a -> 'b) -> 'a -> 'b
The right associative application.
Useful when writing to much parentheses:
<< f (g x ... t) >> becomes << f& g x ... t >>
<< f (g (h x)) >> becomes << f& g& h x >>
val (|>) : 'a -> ('a -> 'b) -> 'b
The reversed application combinator.
Useful to describe some operations chaining.
<< f x (g y (h z)) >> becomes << z |> h |> g y |> f x >>
val (@:=) : 'a list Pervasives.ref -> 'a list -> unit
r @:= l
is equivalent to r := !r @ l
val memo : ('a -> 'b) -> 'a -> 'b