mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
SequenceType => Sequence
This commit is contained in:
committed by
Max Moiseev
parent
c678a839dc
commit
844b81c46b
@@ -77,7 +77,7 @@ public func max<T : Comparable>(x: T, _ y: T, _ z: T, _ rest: T...) -> T {
|
||||
/// iterator.next() // nil
|
||||
public struct EnumeratedIterator<
|
||||
Base : IteratorProtocol
|
||||
> : IteratorProtocol, SequenceType {
|
||||
> : IteratorProtocol, Sequence {
|
||||
|
||||
internal var _base: Base
|
||||
internal var _count: Int
|
||||
@@ -105,11 +105,11 @@ public struct EnumeratedIterator<
|
||||
///
|
||||
/// `EnumeratedSequence` is a sequence of pairs (*n*, *x*), where *n*s
|
||||
/// are consecutive `Int`s starting at zero, and *x*s are the elements
|
||||
/// of a `Base` `SequenceType`:
|
||||
/// of a `Base` `Sequence`:
|
||||
///
|
||||
/// var s = ["foo", "bar"].enumerated
|
||||
/// Array(s) // [(0, "foo"), (1, "bar")]
|
||||
public struct EnumeratedSequence<Base : SequenceType> : SequenceType {
|
||||
public struct EnumeratedSequence<Base : Sequence> : Sequence {
|
||||
internal var _base: Base
|
||||
|
||||
/// Construct from a `Base` sequence.
|
||||
|
||||
Reference in New Issue
Block a user