F
Size: a a a
Gᅠ
SA
vn
vn
AT
—
func test() {
var a = [ComparableType("12312s"), ComparableType("123sd")]
a.sort { $0 > $1 }
}
protocol MyOwnProtocol: Comparable {
}
struct ComparableType<T: Comparable>: MyOwnProtocol {
let name: T
init(_ name: T) {
self.name = name
}
static func < (lhs: ComparableType, rhs: ComparableType) -> Bool {
lhs.name < rhs.name
}
static func == (lhs: ComparableType, rhs: ComparableType) -> Bool {
lhs.name == rhs.name
}
}
VM
AK
KP
AK
KP
AK
В
AK
ЛС