Doc for `partitioningIndex` doesn't mention preconditions on the `self` collection.
dabrahams opened this issue · 2 comments
The original phrasing in the algorithms prototype was “The collection must already be partitioned according to the predicate, as if self.partition(by: predicate)
had already been called.”
I'm wrong; it's there, but just buried in "Discussion." Information essential for using a function, especially preconditions, shouldn't be in “Discussion,” but if you disagree, just close this.
Per documentation guidelines, the abstract of a function describes the purpose of the function. Preconditions for the target of the method or its parameters, and other information you might need, is in the discussion, parameter, or return value sections, as appropriate.
Feel free to propose revisions if you think that would make it more clear!