seangwright / typescript-functional-extensions

A TypeScript implementation of the C# library CSharpFunctionalExtensions, including synchronous and asynchronous Maybe and Result monads.
MIT License
33 stars 4 forks source link

feat(api): add bindFailure & bindFailureAsync #22

Closed GregOnNet closed 1 year ago

GregOnNet commented 1 year ago

This PR includes the operators bindFailure & bindFailureAsync.

They allow recovering from a failed Result by executing an operation that yields another Result. It works accordingly to mapFailure.

The discussion to this PR can be found in #20

seangwright commented 1 year ago

Thanks for the contribution! Apologies on taking so long to get it merged in 🙏🏼