stdlib: protocol extensions: de-underscore enumerate()

Swift SVN r28231
This commit is contained in:
Dmitri Hrybenko
2015-05-07 00:30:12 +00:00
parent 3382f06428
commit 7e9063a4af
6 changed files with 18 additions and 29 deletions

View File

@@ -27,13 +27,15 @@ extension SequenceType {
/// *n*s are consecutive `Int`s starting at zero, and *x*s are
/// the elements of `base`:
///
/// > for (n, c) in enumerate("Swift") { println("\(n): '\(c)'" ) }
/// > for (n, c) in enumerate("Swift".characters) {
/// println("\(n): '\(c)'")
/// }
/// 0: 'S'
/// 1: 'w'
/// 2: 'i'
/// 3: 'f'
/// 4: 't'
final public func _prext_enumerate() -> EnumerateSequence<Self> {
final public func enumerate() -> EnumerateSequence<Self> {
return EnumerateSequence(self)
}
}