[stdlib] Nest some additional operators (#9646)

This commit is contained in:
Nate Cook
2017-05-17 21:44:08 -05:00
committed by Ben Cohen
parent 89515f8485
commit ca5c65f93c
6 changed files with 60 additions and 64 deletions

View File

@@ -103,20 +103,18 @@ extension LazySequenceProtocol {
public struct LazyDropWhileIndex<Base : Collection> : Comparable {
/// The position corresponding to `self` in the underlying collection.
public let base: Base.Index
}
public func == <Base>(
lhs: LazyDropWhileIndex<Base>,
rhs: LazyDropWhileIndex<Base>
) -> Bool {
return lhs.base == rhs.base
}
public static func == (
lhs: LazyDropWhileIndex, rhs: LazyDropWhileIndex
) -> Bool {
return lhs.base == rhs.base
}
public func < <Base>(
lhs: LazyDropWhileIndex<Base>,
rhs: LazyDropWhileIndex<Base>
) -> Bool {
return lhs.base < rhs.base
public static func < (
lhs: LazyDropWhileIndex, rhs: LazyDropWhileIndex
) -> Bool {
return lhs.base < rhs.base
}
}
% for Traversal in ['Forward', 'Bidirectional']: