Util
This module contains numerous utility functions on strings, lists, arrays, etc.
Mapping under pairs
Folding under pairs
Equality on pairs
Mapping under triplets
module Empty : sig ... end
module String = CString
Substitute %s in the first chain by the second chain
module Array : CArray.ExtS
Left-to-right function composition:
f1 %> f2
is fun x -> f2 (f1 x)
.
f1 %> f2 %> f3
is fun x -> f3 (f2 (f1 x))
.
f1 %> f2 %> f3 %> f4
is fun x -> f4 (f3 (f2 (f1 x)))
etc.
val delayed_force : 'a delayed -> 'a
try_finally f x g y
applies the main code f
to x
and returns the result after having applied the finalization code g
to y
. If the main code raises the exception exn
, the finalization code is executed and exn
is raised. If the finalization code itself fails, the exception returned is always the one from the finalization code. Credit X.Leroy, D.Remy.
type iexn = Exninfo.iexn
val iraise : Exninfo.iexn -> 'a
module Union : sig ... end
module Compare : sig ... end
Helpers to write comparison functions
Open an utf-8 encoded file and skip the byte-order mark if any.