mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[stdlib] Propagate GeneratorType docs to models
Swift SVN r22208
This commit is contained in:
@@ -39,7 +39,7 @@ public protocol BooleanType {
|
||||
/// Also, the generators must be obtained by distinct calls to the
|
||||
/// *sequence's* `generate()` method, rather than by copying.
|
||||
public protocol GeneratorType {
|
||||
/// The type of element to be bound to the loop variable.
|
||||
/// The type of element generated by `self`.
|
||||
typealias Element
|
||||
|
||||
/// Advance to the next element and return it, or `nil` if no next
|
||||
@@ -170,6 +170,12 @@ public struct GeneratorSequence<
|
||||
_base = base
|
||||
}
|
||||
|
||||
/// Advance to the next element and return it, or `nil` if no next
|
||||
/// element exists.
|
||||
///
|
||||
/// Requires: `next()` has not been applied to a copy of `self`
|
||||
/// since the copy was made, and no preceding call to `self.next()`
|
||||
/// has returned `nil`.
|
||||
public mutating func next() -> G.Element? {
|
||||
return _base.next()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user