node-linkedlist icon indicating copy to clipboard operation
node-linkedlist copied to clipboard

Added test which breaks (re: Issue #1)

Open siggiorn opened this issue 10 years ago • 1 comments

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 avatar Aug 07 '15 20:08 siggiorn

@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

kilianc avatar Sep 23 '15 21:09 kilianc