Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should match's return type be void? #4

Open
bwestergard opened this issue Jun 26, 2017 · 2 comments
Open

Should match's return type be void? #4

bwestergard opened this issue Jun 26, 2017 · 2 comments

Comments

@bwestergard
Copy link

Shouldn't the return type of match, and by extension the MatchBlock type, be polymorphic?

type MatchBlock<R, T, F> = {
  Ok(value: T): R;
  Fail(failure: F): R;
}
// ...
match(block: MatchBlock<R, T, F>): R;
@Havvy
Copy link
Owner

Havvy commented Jun 26, 2017

cc @bbqsrc

@Havvy
Copy link
Owner

Havvy commented Jul 7, 2017

Probably. If you want to send a PR, I'll accept it and push out a new release.

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

No branches or pull requests

2 participants