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