Call out the behavior for empty sequences.

Fixes rdar://60543202

(cherry picked from commit d0d4a88823)
This commit is contained in:
Alex Martini
2021-06-23 14:49:44 -07:00
parent 1401743790
commit b0f339799f
2 changed files with 4 additions and 0 deletions

View File

@@ -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.