Utilities regarding refs
val refset : 'a Stdlib.ref -> 'a -> unit
refset r x
sets x
to ref r
.
val refget : 'a Stdlib.ref -> 'a
val refupdate : 'a Stdlib.ref -> ('a -> 'a) -> unit
refupdate r f
updates referent of r
by f
.
val refupdate' : ('a -> 'a) -> 'a Stdlib.ref -> unit
refupdate' f r
is equivalent to refupdate r f
.
val refupdate_and_calc : 'x Stdlib.ref -> ('x -> 'a * 'x) -> 'a
refupdate_and_calc r f
calculate a result and the a updated referent value from the current referent value of r
using f
.
val refappend : 'a list Stdlib.ref -> 'a -> unit
refappend r x
appends x
to referent of r
.
val refappend' : 'a -> 'a list Stdlib.ref -> unit
refappend' x r
is equivalent to refappend r x
.
val refpop : 'a list Stdlib.ref -> 'a
refpop r
pop first item of the list referred to by r
. Raises Not_found
if the list is empty.
val incr : int Stdlib.ref -> unit
incr r
increases the referent of r
by one.
val decr : int Stdlib.ref -> unit
decr r
decreases the referent of r
by one.
val refupdate'_and_get : ('a -> 'a) -> 'a Stdlib.ref -> 'a
val get_and_refupdate' : ('a -> 'a) -> 'a Stdlib.ref -> 'a
val incr_and_get : int Stdlib.ref -> int
val decr_and_get : int Stdlib.ref -> int
val get_and_incr : int Stdlib.ref -> int
val get_and_decr : int Stdlib.ref -> int
Exception helper functions
val failwith' : ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'a
val invalid_arg' : ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'a
(Section name todo)
val mul : int -> int -> int
val div : int -> int -> int
val rem : int -> int -> int
Utilities useful in idiomatic functional programming
val constant : 'a -> 'b -> 'a
val iotaf : (int -> 'a) -> int -> 'a list
val iotaf' : (int -> unit) -> int -> unit
val iotafl : ('a -> int -> 'a) -> 'a -> int -> 'a
val iotafl' : ('a -> 'b -> 'a) -> 'a -> (int -> 'b) -> int -> 'a
val min_by : ('a -> 'b) -> 'a -> 'a -> 'a
val max_by : ('a -> 'b) -> 'a -> 'a -> 'a
val projected_compare : ('a -> 'b) -> 'a -> 'a -> int
val swap : ('x * 'y) -> 'y * 'x
val foldl : ('a -> 'b -> 'a) -> 'a -> 'b list -> 'a
val foldr : ('a -> 'b -> 'b) -> 'b -> 'a list -> 'b
include module type of Functionals.BasicInfix
val (&) : ('x -> 'y) -> 'x -> 'y
val (%) : ('y -> 'z) -> ('x -> 'y) -> 'x -> 'z
val (%%) : ('a -> 'y -> 'z) -> ('x -> 'y) -> 'a -> 'x -> 'z
val (&>) : ('x -> 'y) -> ('y -> 'z) -> 'x -> 'z
val (?.) : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c
val (?..) : ('a -> 'b -> 'c -> 'd) -> 'c -> 'a -> 'b -> 'd
val (!.) : 'b -> ('b -> 'b -> 'c) -> 'b -> 'c
val (!..) : 'c -> ('a -> 'b -> 'c -> 'd) -> 'a -> 'b -> 'd
val (&&>) : ('x -> 'y -> 'z) -> ('z -> 'r) -> 'x -> 'y -> 'r
val (|->) : 'x -> ('x -> unit) -> 'x
val (//) : ('a -> 'x) -> ('b -> 'y) -> ('a * 'b) -> 'x * 'y
val (/>) : ('a * 'b) -> ('b -> 'c) -> 'a * 'c
val (/<) : ('a * 'b) -> ('a -> 'c) -> 'c * 'b
val (|+>) : 'a -> ('a -> 'b) -> 'a * 'b
val (|+<) : 'a -> ('a -> 'b) -> 'b * 'a
val (?>) : ('b -> 'c) -> ('a * 'b) -> 'a * 'c
val (?<) : ('a -> 'c) -> ('a * 'b) -> 'c * 'b
val (?+>) : ('a -> 'b) -> 'a -> 'a * 'b
val (?+<) : ('a -> 'b) -> 'a -> 'b * 'a
val (?&>) : ('y2 -> 'x2) -> (('x1 * 'x2) -> 'r) -> ('x1 * 'y2) -> 'r
val (?&<) : ('y1 -> 'x1) -> (('x1 * 'x2) -> 'r) -> ('y1 * 'x2) -> 'r
val (!!) : ('a -> 'b -> 'x) -> ('a * 'b) -> 'x
val (!?) : (('a * 'b) -> 'x) -> 'a -> 'b -> 'x
(Section name todo)
(Section name todo)
Enhanced Stdlib
type ('a, 'b) either = ('a, 'b) Either.t
module Queue : sig ... end
val some : 'a -> 'a option
val (>?) : 'a option -> ('a -> 'b) -> 'b option
val (>>?) : 'a option -> ('a -> 'b option) -> 'b option
val (|?!) : 'a Option.t -> (unit -> 'a) -> 'a
val (&>?) : ('x -> 'y option) -> ('y -> 'z) -> 'x -> 'z option
val (&>>?) : ('x -> 'y option) -> ('y -> 'z option) -> 'x -> 'z option
module Array : sig ... end
module List : sig ... end
include module type of List.Ops_piping
val (|!>) : 'x List.t -> ('x -> unit) -> unit
val (|@>) : 'x List.t -> ('acc * (('acc * 'x) -> 'acc)) -> 'acc
val (|+&?>) : 'x List.t -> ('x -> 'y option) -> ('x * 'y) List.t
module Bytes : sig ... end
module MapPlus (M : Stdlib.Map.S) : sig ... end
include module type of IoPervasives
val with_output_file : string -> (Stdlib.out_channel -> 'a) -> 'a
val slurp_stdin : ?buf:bytes -> unit -> string
val slurp_file : string -> string
val spit_file : string -> string -> unit
all according to proleptic Gregorian Calender
type ppf = Stdlib.Format.formatter
val color_enabled : bool Stdlib.ref
val fprintf :
Stdlib.Format.formatter ->
('a, Stdlib.Format.formatter, unit) Stdlib.format ->
'a
val printf : ('a, Stdlib.Format.formatter, unit) Stdlib.format -> 'a
val sprintf : ('a, Stdlib.Format.formatter, unit, string) Stdlib.format4 -> 'a
val eprintf : ('a, Stdlib.Format.formatter, unit) Stdlib.format -> 'a
val pp_of_to_string : ('a -> string) -> Stdlib.Format.formatter -> 'a -> unit
val to_string_of_pp : (Stdlib.Format.formatter -> 'a -> unit) -> 'a -> string
val pps : ('a -> string) -> Stdlib.Format.formatter -> 'a -> unit
val spp : (Stdlib.Format.formatter -> 'a -> unit) -> 'a -> string
val pp_int : Stdlib.Format.formatter -> int -> unit
val pp_float : Stdlib.Format.formatter -> float -> unit
val pp_string : Stdlib.Format.formatter -> string -> unit
val pp_string_quoted : Stdlib.Format.formatter -> string -> unit
val pp_char : Stdlib.Format.formatter -> char -> unit
val pp_bool : Stdlib.Format.formatter -> bool -> unit
val pp_unit : Stdlib.Format.formatter -> unit -> unit
val pp_ref_address : Stdlib.Format.formatter -> 'x Stdlib.ref -> unit
val pp_int32 : Stdlib.Format.formatter -> int32 -> unit
val pp_int64 : Stdlib.Format.formatter -> int64 -> unit
val pp_integer_sep' :
padding:(int * char) option ->
Stdlib.Format.formatter ->
int ->
unit
val pp_integer_sep : Stdlib.Format.formatter -> int -> unit
val pp_multiline : Stdlib.Format.formatter -> string -> unit
val pp_exn : Stdlib.Format.formatter -> exn -> unit
val pp_full_exn' :
Stdlib.Format.formatter ->
(exn * Stdlib.Printexc.raw_backtrace) ->
unit
val pp_full_exn : Stdlib.Format.formatter -> exn -> unit
val string_of_symbolic_output_items :
Stdlib.Format.symbolic_output_item list ->
string
module Log0 : sig ... end
val debug :
?modul:string ->
('a, Stdlib.Format.formatter, unit, unit) Stdlib.format4 ->
'a
val info :
?modul:string ->
('a, Stdlib.Format.formatter, unit, unit) Stdlib.format4 ->
'a
type backtrace_info = [
|
`ocaml_backtrace of Stdlib.Printexc.raw_backtrace
|
`string_stacktrace of string
]
module Json : sig ... end
encode / decode a string according to the RFC 3986 Section 2.1 URI Generic Syntax - Percent-Encoding syntax