node-linkedlist
node-linkedlist copied to clipboard
Added test which breaks (re: Issue #1)
Added two tests, one removes non-first value in list during iteration (and succeeds). The second removes first value in list during iterations (and fails).
@siggiorn I just looked at this and to be honest and I am not sure which one is the correct behavior. The code is kinda old and I don't remember most of the thinking behind it. next() updates the cursor and returns _next, but _next and _current are the same on start.
Should removeCurrent set _next to _current as well when _current is _head?? O_o