egnha / valaddin

Functional input validation to make R functions more readable and robust
Other
33 stars 1 forks source link

Replacement operators for firm closures #30

Closed egnha closed 5 years ago

egnha commented 7 years ago

These would accompany the component extractors firm_core(), firm_checks(), firm_args(), firm_error(). They should apply only to firm closures.

Example: Replace the (input validation) checks of one function by those of another

f <- firmly(function(x, y) NULL, ~is.numeric) 
g <- firmly(function(x, y) NULL, ~is.character)

firm_checks(f) <- firm_checks(g)
egnha commented 5 years ago

Package frozen at 1.0.0.