mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Call out the behavior for empty sequences.
Fixes rdar://60543202
(cherry picked from commit d0d4a88823)
This commit is contained in:
@@ -236,6 +236,8 @@ extension AsyncSequence {
|
||||
/// The predicate executes each time the asynchronous sequence produces an
|
||||
/// element, until either the predicate returns `false` or the sequence ends.
|
||||
///
|
||||
/// If the asynchronous sequence is empty, this method returns `true`.
|
||||
///
|
||||
/// - Parameter predicate: A closure that takes an element of the asynchronous
|
||||
/// sequence as its argument and returns a Boolean value that indicates
|
||||
/// whether the passed element satisfies a condition.
|
||||
|
||||
@@ -529,6 +529,8 @@ extension Sequence {
|
||||
/// let allHaveAtLeastFive = names.allSatisfy({ $0.count >= 5 })
|
||||
/// // allHaveAtLeastFive == true
|
||||
///
|
||||
/// If the sequence is empty, this method returns `true`.
|
||||
///
|
||||
/// - Parameter predicate: A closure that takes an element of the sequence
|
||||
/// as its argument and returns a Boolean value that indicates whether
|
||||
/// the passed element satisfies a condition.
|
||||
|
||||
Reference in New Issue
Block a user