valaddin provides a functional operator,
enhances functions with input validation. You supply a function
along with input validation requirements, and
firmly returns a
function that applies
f “firmly”: before a call to
attempted, its inputs are checked, and if any check fails, an error halts
further execution with a message tabulating every failing check. Because
firmly implements input validation by operating on whole functions
rather than values, it is suitable for both programming and interactive use.
firmly to add input validation to your functions improves the
legibility, reusability, and reliability of your code:
Emphasize the core logic of your functions by excising validation boilerplate.
Reduce duplication by reusing common checks across functions with common input requirements.
Make function outputs more predictable by constraining their inputs.
Vary the strictness of a function according to need and circumstance.
For an example-oriented overview of valaddin, see
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.