Ok, you're right about `min`, `max` and `self` (I actually prefer to use `math.min` in my own code, I only used `RichInt`'s `min` because I saw in `indexWhere` and wanted to follow the style). I'm going to change them.

I'm not so sure about changing `length` usage to a `try`, as I'm afraid it will bring some penalties to performance (and to readability, of course). Moreover, [IndexedSeqOptimized](http://www.scala-lang.org/api/2.11.0/index.html#scala.collection.IndexedSeqOptimized) scaladoc states that "Indexed sequences support constant-time or near constant-time element access and length computation. They are defined in terms of abstract methods apply for indexing and length". From the point of view of a guy who must implement a custom collection, I would assume from there that I must provide a efficient `length` if implementing `IndexSeqOptimized`. I see `length` being freely used throughout the class even when not explicitely needed, such as in `startsWith`, `segmentLength` or even in `isEmpty`.

This is the first pull request that I'm submitting to Scala, so I don't know how should I proceed. Can I add a new commit to this pull request with the fixes you mentioned? Or should I close this PR and open a new one containing a single commit already with the changes?