Package: decorators 0.3.0
Harel Lustiger
decorators: Extend the Behaviour of a Function without Explicitly Modifying it
A decorator is a function that receives a function, extends its behaviour, and returned the altered function. Any caller that uses the decorated function uses the same interface as it were the original, undecorated function. Decorators serve two primary uses: (1) Enhancing the response of a function as it sends data to a second component; (2) Supporting multiple optional behaviours. An example of the first use is a timer decorator that runs a function, outputs its execution time on the console, and returns the original function's result. An example of the second use is input type validation decorator that during running time tests whether the caller has passed input arguments of a particular class. Decorators can reduce execution time, say by memoization, or reduce bugs by adding defensive programming routines.
Authors:
decorators_0.3.0.tar.gz
decorators_0.3.0.zip(r-4.5)decorators_0.3.0.zip(r-4.4)decorators_0.3.0.zip(r-4.3)
decorators_0.3.0.tgz(r-4.4-any)decorators_0.3.0.tgz(r-4.3-any)
decorators_0.3.0.tar.gz(r-4.5-noble)decorators_0.3.0.tar.gz(r-4.4-noble)
decorators_0.3.0.tgz(r-4.4-emscripten)decorators_0.3.0.tgz(r-4.3-emscripten)
decorators.pdf |decorators.html✨
decorators/json (API)
NEWS
# Install 'decorators' in R: |
install.packages('decorators', repos = c('https://tidylab.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/tidylab/decorators/issues
Last updated 2 years agofrom:c74e1ad648. Checks:OK: 1 WARNING: 6. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Nov 12 2024 |
R-4.5-win | WARNING | Nov 12 2024 |
R-4.5-linux | WARNING | Nov 12 2024 |
R-4.4-win | WARNING | Nov 12 2024 |
R-4.4-mac | WARNING | Nov 12 2024 |
R-4.3-win | WARNING | Nov 12 2024 |
R-4.3-mac | WARNING | Nov 12 2024 |
Exports:%>%%||%time_itvalidate_arguments
Readme and manuals
Help Manual
Help page | Topics |
---|