|
13 | 13 |
|
14 | 14 | /// A sequence whose elements consist of the initial consecutive elements of
|
15 | 15 | /// some base sequence that satisfy a given predicate.
|
| 16 | +/// |
| 17 | +/// - Note: When `LazyPrefixWhileSequence` wraps a collection type, the |
| 18 | +/// performance of accessing `endIndex` depends on how many |
| 19 | +/// elements satisfy the predicate at the start of the collection, and might |
| 20 | +/// not offer the usual performance given by the `Collection` protocol. |
| 21 | +/// Accessing `endIndex`, the `last` property, or calling methods that |
| 22 | +/// depend on moving indices might not have the documented complexity. |
16 | 23 | @frozen // lazy-performance
|
17 | 24 | public struct LazyPrefixWhileSequence<Base: Sequence> {
|
18 | 25 | public typealias Element = Base.Element
|
@@ -98,15 +105,14 @@ extension LazySequenceProtocol {
|
98 | 105 | }
|
99 | 106 | }
|
100 | 107 |
|
101 |
| -/// A lazy `${Collection}` wrapper that includes the initial consecutive |
| 108 | +/// A lazy collection wrapper that includes the initial consecutive |
102 | 109 | /// elements of an underlying collection that satisfy a predicate.
|
103 | 110 | ///
|
104 |
| -/// - Note: The performance of accessing `endIndex`, `last`, any methods that |
105 |
| -/// depend on `endIndex`, or moving an index depends on how many elements |
106 |
| -/// satisfy the predicate at the start of the collection, and may not offer |
107 |
| -/// the usual performance given by the `Collection` protocol. Be aware, |
108 |
| -/// therefore, that general operations on `${Self}` instances may not have |
109 |
| -/// the documented complexity. |
| 111 | +/// - Note: The performance of accessing `endIndex` depends on how many |
| 112 | +/// elements satisfy the predicate at the start of the collection, and might |
| 113 | +/// not offer the usual performance given by the `Collection` protocol. |
| 114 | +/// Accessing `endIndex`, the `last` property, or calling methods that |
| 115 | +/// depend on moving indices might not have the documented complexity. |
110 | 116 | public typealias LazyPrefixWhileCollection<T: Collection> = LazyPrefixWhileSequence<T>
|
111 | 117 |
|
112 | 118 | extension LazyPrefixWhileCollection {
|
|
0 commit comments