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

add ability to pass different context #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

mkuklis
Copy link

@mkuklis mkuklis commented Dec 18, 2014

I ran into situation where I had to apply thunkify to function executed from different context. The alternative here could be to just run: thunkify(fn).bind(ctx) but it would be convenient to just pass it as an argument ;)

@a8m
Copy link
Contributor

a8m commented Dec 18, 2014

I use thunkify.call(ctx, fn) instead when I want to pass the execution's context, but this kind of equivalent.

@mkuklis
Copy link
Author

mkuklis commented Dec 18, 2014

ah of course apply and call would work here too but it's kind of like bind.

@roymiloh
Copy link

roymiloh commented Jan 2, 2015

👍 . I encountered the same problem and solved with the same solution.

@luokuning
Copy link

I don't think thunkify.call(ctx, fn) equal to thunkify(fn).bind(ctx) here...

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.

4 participants