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

A better example of issues one can run into with variadic iteratees #54

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

Conversation

Restuta
Copy link

@Restuta Restuta commented Aug 10, 2017

As indicated in the example I tried ['1', '2', '3'].forEach(parseInt); and got undefined as expected. I am not sure why would it output anything else, since forEach doesn't return anything, but when I run ['1', '2', '3'].map(parseInt); I got [1, NaN, NaN] which is not what I expected. So I think this better illustrates the problem.

As indicated in the example I tried `['1', '2', '3'].forEach(parseInt);` and god `undefined` _as expected. I am not sure why would it output anything else, since forEach doesn't return anything, but when I run `['1', '2', '3'].map(parseInt);` I got `[1, NaN, NaN]` which is not what I expected. So I think this better illustrates the problem.
@graingert
Copy link
Collaborator

I've recently merged #62 which fixed the travis tests. Please could you rebase this PR to re-run the travis tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants