@@ -18,9 +18,8 @@ extension Sequence {
18
18
/// - Precondition: This sequence must be finite,
19
19
/// and be sorted according to the given predicate.
20
20
///
21
- /// - Parameters:
22
- /// - type: A reference to the returned collection's type.
23
- /// - areInIncreasingOrder: The sorting predicate.
21
+ /// - Parameter type: A reference to the returned collection's type.
22
+ /// - Parameter areInIncreasingOrder: The sorting predicate.
24
23
/// - Returns: A collection of pairs,
25
24
/// one for each element equivalence class present in this sequence,
26
25
/// in order of appearance.
@@ -56,8 +55,7 @@ extension Sequence {
56
55
/// - Precondition: This sequence must be finite,
57
56
/// and be sorted according to the given predicate.
58
57
///
59
- /// - Parameters:
60
- /// - areInIncreasingOrder: The sorting predicate.
58
+ /// - Parameter areInIncreasingOrder: The sorting predicate.
61
59
/// - Returns: An array of pairs,
62
60
/// one for each element equivalence class present in this sequence,
63
61
/// in order of appearance.
@@ -80,8 +78,7 @@ extension Sequence {
80
78
/// - Precondition: This sequence must be finite,
81
79
/// and be sorted according to the given predicate.
82
80
///
83
- /// - Parameters:
84
- /// - areInIncreasingOrder: The sorting predicate.
81
+ /// - Parameter areInIncreasingOrder: The sorting predicate.
85
82
///
86
83
/// - Returns: An array with the earliest element in this sequence for
87
84
/// each equivalence class.
@@ -137,8 +134,7 @@ extension LazySequenceProtocol {
137
134
/// - Precondition: This squence is sorted according to the given predicate,
138
135
/// and cannot end with an infinite run of a single equivalence class.
139
136
///
140
- /// - Parameters:
141
- /// - areInIncreasingOrder: The sorting predicate.
137
+ /// - Parameter areInIncreasingOrder: The sorting predicate.
142
138
///
143
139
/// - Returns: A sequence that lazily generates the first element of
144
140
/// each equivalence class present in this sequence paired with
@@ -156,8 +152,7 @@ extension LazySequenceProtocol {
156
152
/// - Precondition: This squence is sorted according to the given predicate,
157
153
/// and cannot end with an infinite run of a single equivalence class.
158
154
///
159
- /// - Parameters:
160
- /// - areInIncreasingOrder: The sorting predicate.
155
+ /// - Parameter areInIncreasingOrder: The sorting predicate.
161
156
///
162
157
/// - Returns: A sequence that lazily generates the first element of
163
158
/// each equivalence class present in this sequence.
@@ -260,6 +255,8 @@ public struct CountDuplicatesIterator<Base: IteratorProtocol> {
260
255
261
256
extension CountDuplicatesIterator : IteratorProtocol {
262
257
public mutating func next( ) -> ( value: Base . Element , count: Int ) ? {
258
+ // NOTE: This method is called only when the predicate isn't `throw`-ing,
259
+ // so the forced `try` is OK.
263
260
try ! throwingNext ( )
264
261
}
265
262
0 commit comments