Closed cbarrick closed 10 years ago
SortedArraySet#length doesn't update when you .pop() and .shift()
.pop()
.shift()
Here's an example from the Node REPL:
> var SortedArraySet = require('collections/sorted-array-set') undefined > var a = new SortedArraySet() undefined > a.add('foo') true > a.add('bar') true > a.length 2 > a.pop() 'foo' > a.shift() 'bar' > a.length 2 > a.length === a.array.length false > a { array: [], contentEquals: [Function], contentCompare: [Function], getDefault: [Function], length: 2 } >
SortedArraySet#length doesn't update when you
.pop()
and.shift()
Here's an example from the Node REPL: