Closed ssnielsen closed 1 year ago
Btw, if you're ok with it, I'm definitely willing to give it a go at fixing it 😉 (forgot to say that above)
@ssnielsen thanks for spotting this issue! indeed, takeWhile
was implemented incorrectly, I fixed it up in v4.0.0-rc.2
:)
benchmarks:
Any chance this fix might be back-ported to v3?
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