View source: R/type_parameters.R
build_parameter_constraint_fns | R Documentation |
Provided a list of type parameters, build functions which can be applied over runtime observed parameter values to test for constraint satisfaction.
build_parameter_constraint_fns(exprs)
exprs |
A list of language objects representing type parameters and type parameter constraints |
Type constraints are returned as one of two classes of functions,
constrain_all
and constrain_each
. Names produce constrain_all
functions, which expect that all observed type parameters are identical,
whereas expressions produce constrain_each
functions, which expect that all
combinations of observed type parameters satisfy the constraint predicate.
A list with named fields constrain_all
and constrain_each
representing two classes of constraints. constrain_all
constraints expect
that all observed values have identical results. constrain each
constraints
expect that each observed value satisfies the constraint predicate.
build_parameter_constraint_fns(list(quote(T), quote(N), quote(N > 3)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.