Skip to content

result: add match function for pattern matching on Result#1

Open
cstrahan wants to merge 1 commit intobacktrace-labs:masterfrom
cstrahan:cstrahan/result-match
Open

result: add match function for pattern matching on Result#1
cstrahan wants to merge 1 commit intobacktrace-labs:masterfrom
cstrahan:cstrahan/result-match

Conversation

@cstrahan
Copy link
Copy Markdown
Contributor

Add a match function that takes a Result<T, E> and dispatches to either an onOk or onErr callback, returning the callback's result.

Supports both direct and curried forms, as well as async callbacks.

Add a match function that takes a Result<T, E> and dispatches to either
an onOk or onErr callback, returning the callback's result.

Supports both direct and curried forms, as well as async callbacks.
@cstrahan
Copy link
Copy Markdown
Contributor Author

/cc @perf2711

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant