Skip to content

Commit b0f3397

Browse files
committed
Call out the behavior for empty sequences.
Fixes rdar://60543202 (cherry picked from commit d0d4a88)
1 parent 1401743 commit b0f3397

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

stdlib/public/Concurrency/AsyncSequence.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@ extension AsyncSequence {
236236
/// The predicate executes each time the asynchronous sequence produces an
237237
/// element, until either the predicate returns `false` or the sequence ends.
238238
///
239+
/// If the asynchronous sequence is empty, this method returns `true`.
240+
///
239241
/// - Parameter predicate: A closure that takes an element of the asynchronous
240242
/// sequence as its argument and returns a Boolean value that indicates
241243
/// whether the passed element satisfies a condition.

stdlib/public/core/SequenceAlgorithms.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,8 @@ extension Sequence {
529529
/// let allHaveAtLeastFive = names.allSatisfy({ $0.count >= 5 })
530530
/// // allHaveAtLeastFive == true
531531
///
532+
/// If the sequence is empty, this method returns `true`.
533+
///
532534
/// - Parameter predicate: A closure that takes an element of the sequence
533535
/// as its argument and returns a Boolean value that indicates whether
534536
/// the passed element satisfies a condition.

0 commit comments

Comments
 (0)