@@ -206,6 +206,9 @@ extension LazySequenceProtocol where Self: Collection, Elements: Collection {
206
206
/// Returns a lazy collection of subsequences of this collection, chunked by
207
207
/// the given predicate.
208
208
///
209
+ /// - Parameter belongInSameGroup: A closure that takes two adjacent elements
210
+ /// of the collection and returns whether or not they belong in the same group
211
+ ///
209
212
/// - Complexity: O(*n*), because the start index is pre-computed.
210
213
@inlinable
211
214
public func chunked(
@@ -220,6 +223,10 @@ extension LazySequenceProtocol where Self: Collection, Elements: Collection {
220
223
/// Returns a lazy collection of subsequences of this collection, chunked by
221
224
/// grouping elements that project to the equal values.
222
225
///
226
+ /// - Parameter projection: A closure that takes an element in the collection
227
+ /// and returns an `Equatable` value that can be used to determine if adjacent
228
+ /// elements belong in the same group
229
+ ///
223
230
/// - Complexity: O(*n*), because the start index is pre-computed.
224
231
@inlinable
225
232
public func chunked< Subject> (
@@ -239,6 +246,9 @@ extension Collection {
239
246
/// Returns a collection of subsequences of this collection, chunked by the
240
247
/// given predicate.
241
248
///
249
+ /// - Parameter belongInSameGroup: A closure that takes two adjacent elements
250
+ /// of the collection and returns whether or not they belong in the same group
251
+ ///
242
252
/// - Complexity: O(*n*), where *n* is the length of this collection.
243
253
@inlinable
244
254
public func chunked(
@@ -268,6 +278,10 @@ extension Collection {
268
278
/// Returns a collection of subsequences of this collection, chunked by
269
279
/// grouping elements that project to equal values.
270
280
///
281
+ /// - Parameter projection: A closure that takes an element in the collection
282
+ /// and returns an `Equatable` value that can be used to determine if adjacent
283
+ /// elements belong in the same group
284
+ ///
271
285
/// - Complexity: O(*n*), where *n* is the length of this collection.
272
286
@inlinable
273
287
public func chunked< Subject: Equatable > (
0 commit comments