Use decorators on Value Objects such that: * `decorators$assert_input_type` checks input arg complies with default value type * `decorators$assert_input_equal_length` checks input args are of the same length [See related issue](https://github.com/tidylab/R6P/issues/15) ``` Cars <- function(model = NA_charater, hp = NA_real_){ data.frame(model = model, hp = hp) } Cars <- decorators$assert_input_type(Cars) Cars <- decorators$assert_input_equal_length(Cars) ```
Use decorators on Value Objects such that:
decorators$assert_input_typechecks input arg complies with default value typedecorators$assert_input_equal_lengthchecks input args are of the same lengthSee related issue