scala-rrb-vector
scala-rrb-vector copied to clipboard
prepend can create thin tree
For the record, there is a problem in how prependFrontNewBlock determines the insertion depth. The search for the insertion point starts with focusDepth. However, there can be trees for which the insertion point should be lower, specifically a tree created by prepend that has a skinny leading edge. The resulting tree behaves correctly, except that it is less dense than it should be. The effect is that additional expansion of that tree will fail before the full maximum tree size is reached.