Type.Function
Instance of Polymorphic2 for functions: same signature than Polymorphic2 with possibility to specify a label for the function parameter.
Polymorphic2
type ('a, 'b) poly = 'a -> 'b
val instantiate : ?label:(string * (unit -> 'a) option) -> 'a t -> 'b t -> ('a -> 'b) t * bool
Possibility to add a label for the parameter.
~label:(p,None)
p
~label:(p,Some f)
f ()
val is_instance_of : 'a t -> bool
val get_instance : ('a -> 'b) t -> 'a t * 'b t * string option
val get_optional_argument : ('a -> 'b) t -> (unit -> 'a) option