Skip to content

Instantly share code, notes, and snippets.

@pjcau
pjcau / Protocols Equatable with ProtocolsType.txt
Last active September 28, 2020 20:25
Protocols inside protocols type with Equatable
import UIKit
//inner Protocols type
protocol Aerodinamic : Equatable{
var coeficient:Float { get set }
}
extension Aerodinamic {
static func ==(lhs: Self, rhs: Self) -> Bool {
return lhs.coeficient == rhs.coeficient