Commits

Dmitri Hrybenko committed 78222237e02
stdlib: remove FlattenCollection -- it does not model CollectionType properly. An index of a FlattenCollection is composed of two: an index to the current chunk and an index within that chunk. So you take the startIndex, and advance it to the second chunk; call the result idx1. You take startIndex again, and advance it the same number of steps; call the result idx2: let idx1 = flatMapCollection.startIndex.advancedBy(10) let idx2 = flatMapCollection.startIndex.advancedBy(10) idx1 and idx2 have to compare equal according to collection and index axioms. But this can't be cheaply implemented. Every index contains an index into the inner collection. So indices into two collections with the same elements have to compare equal even though the collections don't have any common history, they were merely created using the same sequence of steps. What currently happens is that you get random results depending on the underlying collection kind. rdar://21989896 Swift SVN r30617