Slide 16
Slide 16 text
4&
ϓϩτίϧʹࢁΧοίͰؔ࿈ܕΛॻ͚Δ
// Swift 5.6
protocol Graph {
associatedtype Foo
associatedtype Bar
}
struct GraphStruct: Graph {
typealias Foo = Int
typealias Bar = String
}
protocol TestProtocol {
func bar(_: G, foo: F) -> [B]
where G: Graph, G.Foo == F, G.Bar == B
}
extension Graph where Foo == Int, Bar ==
String {
// ...
}