In that case, I think having a name other than `length` (`shrink` ?)might be called for. Furthermore, if the goal is to *shrink*, then the test should be `assert(i <= this.i)`. The current restriction makes no sense given the current API.

Either that, or provide `capacity`/`reserve`, and document `length` as not being able to exceed the current capacity. This should allow you to have a simple function, but still have the ability to grow.