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

Fix test. #66

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

Fix test. #66

wants to merge 1 commit into from

Conversation

Serabe
Copy link
Contributor

@Serabe Serabe commented Aug 24, 2018

g.apply(g, [f].concat(args)) is changing the context of the function
as g is just being called as such. This change does make it fail
because of the unneeded call.

`g.apply(g, [f].concat(args))` is changing the context of the function
as `g` is just being called as such. This change does make it fail
because of the unneeded call.
@Serabe Serabe requested a review from brzpegasus August 24, 2018 15:55
return (...args) => g.apply(null, [f].concat(args));
};

wrap(1, (a) => a + 2);
Copy link
Member

Choose a reason for hiding this comment

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

Does this specific line play a role in the test failing or passing? Or is it just there to illustrate that g is a function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we don't add this line, then eslint would fail because wrap is an unused variable, not necessarily because of the spread.

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.

2 participants