stdlib: protocol extensions: de-underscore isEmpty

Swift SVN r28241
This commit is contained in:
Dmitri Hrybenko
2015-05-07 00:30:29 +00:00
parent 275cfc0545
commit e96ade89a9
12 changed files with 26 additions and 48 deletions

View File

@@ -25,7 +25,7 @@ GElement = "Generator.Element"
extension CollectionType {
/// Returns the first element of `self`, or `nil` if `self` is empty.
final public var _prext_first: Generator.Element? {
return _prext_isEmpty ? nil : self[startIndex]
return isEmpty ? nil : self[startIndex]
}
}
@@ -35,7 +35,7 @@ extension CollectionType {
extension CollectionType where Index : BidirectionalIndexType {
final public var _prext_last: Generator.Element? {
return _prext_isEmpty ? nil : self[endIndex.predecessor()]
return isEmpty ? nil : self[endIndex.predecessor()]
}
}