Comments (12)
See #65. I've found the bug and reproduced it with a smaller test case. I'd love to get your feedback on the alternative solution I mention in the PR 😄
Thanks again for reporting the issue with a nice and simple test case 👍
from list.
Just lobbying for a bugfix release when possible :-)
I've just released a new version 👍
from list.
simplified the first bug to just two drops:
const L = require("list")
let f = L.list()
for (let i=0;i<1329;i++) {
f = L.append(i, f);
}
const xx = L.drop(3, L.drop(201, f))
console.log(L.first(xx))
console.log(L.nth(0, xx))
-- sanity check
const xx1 = L.fromArray(L.toArray(xx));
console.log(L.first(xx1))
console.log(L.nth(0, xx1))
output is =>
201
204
204
204
from list.
Thank you for reporting the issue @emmanueltouzery. I'm looking into it!
from list.
did you check that your fix fixes both issues reproduced through the first script? The second issue from the first script may be independent because drop
and dropLast
use only slice. In that second issue I don't see first and last playing any role?
from list.
No, I missed that there were two parts and I only tested with the second code. I'll take a look at the other problem as well 😄
from list.
yes unfortunately there are two bugs, I ran the test script from your PR branch:
FIRST ISSUE first() doesn't agree with nth(0)
204
204
SECOND ISSUE list of 4 drop first and last, wrong result
[ 201, 202, 203, 204 ]
[ 201, 202 ]
This kind of bugs seem like showstoppers to me :-(
from list.
You didn't forget about other bug did you? Closing the bug makes it unclear
from list.
You didn't forget about other bug did you? Closing the bug makes it unclear
Don't worry, I didn't 😄
I actually didn't close the issue myself. GitHub automatically closed the issue because I merged the PR #65. Since the PR contained the text "Fixes #64" GitHub thought the issue was fixed.
This kind of bugs seem like showstoppers to me :-(
I agree. List shouldn't have any bugs. See #66. That should fix the issue.
from list.
Yes in general in the commits i say "ref #bug" if it's related to the bug without fixing it. Great otherwise! Hope you make a bugfix release soon :-)
from list.
Yes in general in the commits i say "ref #bug" if it's related to the bug without fixing it.
That's a great tip!
Both issues should be fixed now so I'll close 😄
from list.
Sure let's close. Just lobbying for a bugfix release when possible :-)
from list.
Related Issues (20)
- vindum.io link in README is broken HOT 1
- npm.js package is not linked to github repo HOT 4
- support sanctuary-show HOT 6
- groupWith seems broken HOT 6
- question: flatMap/chain and iterables HOT 3
- at least one other bug in the list HOT 19
- list throws HOT 5
- NonEmptyList HOT 7
- list will not release items for GC HOT 4
- What about `reduced`? HOT 7
- Reverse iteration HOT 10
- Stop mutating HOT 2
- multi-field sort HOT 8
- Can't find fromArray HOT 2
- .random possible? HOT 1
- head() is missing? HOT 3
- nth() throws when it's passed NaN HOT 2
- Access the index on map() operations HOT 4
- findLastIndex HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from list.