Skip to content

Commit b799866

Browse files
authored
Update stdlib/public/core/Sequence.swift
1 parent e1429dd commit b799866

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

stdlib/public/core/Sequence.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,10 @@ public protocol Sequence<Element> {
370370
/// should only implement this method if they can do it in better than linear
371371
/// time.
372372
///
373-
/// This method must not return non-nil on sequences that are destructively
374-
/// consumed by iteration.
373+
/// For sequences that are destructively consumed by iteration, calling this
374+
/// method must not consume any elements. (Such sequences usually leave this
375+
/// method with its default, `nil`-returning implementation, which trivially
376+
/// satisfies this requirement.)
375377
///
376378
/// - Returns: `nil` if containment cannot be verified in better than linear
377379
/// time; otherwise, the method returns a boolean value indicating whether

0 commit comments

Comments
 (0)