Description Usage Arguments Value Author(s) See Also Examples
This function is a constructor for a class that represents information only about the return type of a function and explicitly has no information about the parameters.
1 | ReturnTypeSpecification(type, obj = new("ReturnTypeSpecification"))
|
type |
the type specification. This should be an object of class ClassNameOrExpression or coercible to one. |
obj |
the instance that is to be populated and returned. |
By default, an object of class
ReturnTypeSpecification-class
.
However, it merely returns the value of
obj
after populating it with the value of type
.
So strictly the return value is the augmented
value of obj
.
Duncan Temple Lang <duncan@wald.ucdavis.edu>
IndependentTypeSpecification
SimultaneousTypeSpecification
1 2 3 4 5 | ReturnTypeSpecification(quote(length(x) == 3))
ReturnTypeSpecification("matrix")
ReturnTypeSpecification(new("StrictIsTypeTest", "matrix"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.