@@ -410,6 +410,9 @@ extension LazySequenceProtocol where Self: Collection, Elements: Collection {
410410 /// Returns a lazy collection of subsequences of this collection, chunked by
411411 /// the given predicate.
412412 ///
413+ /// - Parameter belongInSameGroup: A closure that takes two adjacent elements
414+ /// of the sequence and returns whether or not they belong in the same group.
415+ ///
413416 /// - Complexity: O(*n*), because the start index is pre-computed.
414417 @inlinable
415418 public func chunked(
@@ -422,7 +425,11 @@ extension LazySequenceProtocol where Self: Collection, Elements: Collection {
422425 }
423426
424427 /// Returns a lazy collection of subsequences of this collection, chunked by
425- /// grouping elements that project to the same value.
428+ /// grouping elements that project to equal values.
429+ ///
430+ /// - Parameter projection: A closure that takes an element in the sequence
431+ /// and returns an `Equatable` value that can be used to determine if adjacent
432+ /// elements belong in the same group.
426433 ///
427434 /// - Complexity: O(*n*), because the start index is pre-computed.
428435 @inlinable
@@ -443,6 +450,10 @@ extension Collection {
443450 /// Returns a collection of subsequences of this collection, chunked by the
444451 /// given predicate.
445452 ///
453+ /// - Parameter belongInSameGroup: A closure that takes two adjacent elements
454+ /// of the collection and returns whether or not they belong in the same
455+ /// group.
456+ ///
446457 /// - Complexity: O(*n*), where *n* is the length of this collection.
447458 @inlinable
448459 public func chunked(
@@ -470,7 +481,11 @@ extension Collection {
470481 }
471482
472483 /// Returns a collection of subsequences of this collection, chunked by
473- /// grouping elements that project to the same value.
484+ /// grouping elements that project to equal values.
485+ ///
486+ /// - Parameter projection: A closure that takes an element in the collection
487+ /// and returns an `Equatable` value that can be used to determine if adjacent
488+ /// elements belong in the same group.
474489 ///
475490 /// - Complexity: O(*n*), where *n* is the length of this collection.
476491 @inlinable
0 commit comments