Skip to content

add tryTakeVar and tryPeekVar #98

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

Merged
merged 2 commits into from
May 8, 2017

Conversation

syaiful6
Copy link

@syaiful6 syaiful6 commented May 8, 2017

fixes #89

@CLAassistant
Copy link

CLAassistant commented May 8, 2017

CLA assistant check
All committers have signed the CLA.

@garyb garyb requested a review from natefaubion May 8, 2017 11:37
} else if (avar.producers.length > 0) {
avar.producers.shift()(function (x) {
success(just(x));
return nonCanceler;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is necessary. Judging by the other function (which just pass in success and error to the producer, this should just be equivalent to success <<< Just. Which means the JS should be:

avar.producers.shift()(function (x) {
  return success(just(x));
}, error);

Same for the tryPeekVar case.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated, i just using the style i see on FFI file for Aff.js, there _pure, _throwError return nonCanceller. But, i guess you are right, because _fmap in that file even doesn't return nonCanceller, nor return the return value

@natefaubion natefaubion merged commit 2943766 into purescript-contrib:master May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

tryTakeVar and tryPeekVar
3 participants