We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07a8c39 commit 57bddb7Copy full SHA for 57bddb7
stdlib/public/core/Filter.swift
@@ -18,12 +18,11 @@
18
public struct LazyFilterIterator<
19
Base : IteratorProtocol
20
> : IteratorProtocol, Sequence {
21
- /// Advances to the next element and returns it, or `nil` if no next
22
- /// element exists.
+ /// Advance to the next element and return it, or `nil` if no next element
+ /// exists. Once `nil` has been returned, all subsequent calls return `nil`.
23
///
24
/// - Precondition: `next()` has not been applied to a copy of `self`
25
- /// since the copy was made, and no preceding call to `self.next()`
26
- /// has returned `nil`.
+ /// since the copy was made.
27
public mutating func next() -> Base.Element? {
28
while let n = _base.next() {
29
if _predicate(n) {
0 commit comments