Slide 5
Slide 5 text
associatedtype CONTINUED
Moving forward, the following snippet will error out:
protocol SomeProtocol {
associatedtype Container: SequenceType
typealias Element = Container.Generator.Element // X
}
To get around this, use a protocol extension ⭐
protocol SomeProtocol {
associatedtype Container: SequenceType
}
extension SomeProtocol {
typealias Element = Container.Generator.Element
}