typeInfo {TypeInfo} | R Documentation |
These functions provide controlled access to type information for a function. They encapsulate the way the information is stored for the function (although it is trivial to find out how it is done and where the information is)
typeInfo(func) "typeInfo<-"(func, rewrite = TRUE, value)
func |
the function whose type information is to be accessed |
rewrite |
a logical value. This controls whether the body of the
function func is rewritten so that checks for the arguments
and return type are added to the code and the appropriate
actions are taken when the function returns control to the caller.
This is necessary to get calls to return in the function
to behave correctly and allow the return value to be validated.
|
value |
an object of class TypeSpecification-class |
typeInfo
returns the type information associated with
the function.
typeInfo<-
returns the modified function.
Duncan Temple Lang <duncan@wald.ucdavis.edu>
http://www.omegahat.org/OptionalTyping