Feat/added validation in either and result #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces new validation and filtering capabilities to the functional data types
Either,Maybe, andResult, along with comprehensive documentation and tests for these features. Additionally, it strengthens code coverage requirements and makes minor test configuration adjustments.Functional Enhancements
Either:
validatemethod to theEitherinterface, allowing validation ofRightvalues with custom error handling, and a curried helper for functional pipelines. [1] [2] [3] [4]docs/either/index.md) to explain usage patterns and provide real-world examples for both direct and curriedvalidate. [1] [2]validateonEither, covering direct usage, chaining, and functional composition. [1] [2] [3]Maybe:
filtermethod to theMaybeinterface and a curried helper, enabling value filtering based on predicates. [1] [2] [3] [4]docs/maybe/index.md) with examples and use cases for both direct and curriedfilter. [1] [2]filteronMaybe, including chaining and pattern-based filtering. [1] [2]Result:
validatemethod to theResultinterface and a curried helper for functional validation with error messages. [1] [2] [3] [4]docs/result/index.md) with usage patterns, including object validation and error handling. [1] [2]Test & Coverage Configuration
bunfig.toml, and enabled skipping test files from coverage.testscript inpackage.jsonto align with new coverage configuration.These changes collectively enhance the expressiveness and composability of the library, making validation and filtering more idiomatic and robust for functional programming workflows.