We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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.takeWhile
A.filter
First of all, thanks for a solid library - it's really a breeze to use!
While doing a bit of Advent of Code, I noticed unexpected output from A.takeWhile - essentially it seems to act more like A.filter
Examples:
// ts-belt: A.takeWhile([3, 5, 3], n => n < 4); // Returns [3, 3]
I'd expect to get back the single-element list: [3].
[3]
Ramda (and other similar libraries):
// ramda: R.takeWhile(n => n < 4, [3, 5, 3]) // Returns [3]
Smells a bit like a bug to me 😉
Also - looking at a bit further, it looks like this case isn't covered by the tests
Btw, the version in question is 3.13.1
3.13.1
The text was updated successfully, but these errors were encountered:
Btw, if you're ok with it, I'm definitely willing to give it a go at fixing it 😉 (forgot to say that above)
Sorry, something went wrong.
@ssnielsen thanks for spotting this issue! indeed, takeWhile was implemented incorrectly, I fixed it up in v4.0.0-rc.2 :)
takeWhile
v4.0.0-rc.2
test case: 235f223#diff-39838e57d36e74e0f3b610bc317412d00c08c0f67a99d5b8f1cae4784ae33cfbR9
benchmarks:
Any chance this fix might be back-ported to v3?
mobily
No branches or pull requests
First of all, thanks for a solid library - it's really a breeze to use!
While doing a bit of Advent of Code, I noticed unexpected output from
A.takeWhile
- essentially it seems to act more likeA.filter
Examples:
I'd expect to get back the single-element list:
[3]
.Ramda (and other similar libraries):
Smells a bit like a bug to me 😉
Also - looking at a bit further, it looks like this case isn't covered by the tests
Btw, the version in question is
3.13.1
The text was updated successfully, but these errors were encountered: