-
Notifications
You must be signed in to change notification settings - Fork 128
Emulation of Rust's ? operator #448
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
Conversation
nice |
const errVal = "err" | ||
const okValues = Array<string>() | ||
|
||
const result = safeTry(function*() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So basically I can do something like
const caller = ():Result<string,MyError> => {
// foobar: Result<string,MyError>
const res = yield* foobar().safeUnwrap()
return res + "hello"
)
}
Any contributors reviewing this? |
Sorry, life recently has made it tough to be as attentive as I used to be. I'll see if I can have a look this coming weekend. |
Bump |
Any updates? |
Hello! |
Would anyone here be willing to contribute to the docs / readme? A few examples would be much appreciated for folks who aren't so familiar with generators as well (myself included). |
Extremely basic docs have been added in this commit: 1fd6a05 |
This is what I proposed in #444 , with some superficial modification to match the current APIs.
Closes #444