如何将<
运算符分配给变量?我在扩展中需要这个:
extension: CollectionType where Generator.Element: Comparable {
func someFunc {
let op: (lhs: Self, rhs: Self) -> Bool
if <some_condition> {
op = Self.Generator.Element.< // - this is not work
} else {
op = Self.Generator.Element.> // - this is not work
}
}
}