Is there a way to write an extension referencing an instance with an associated type. I have the feeling that it is something that is supported one way or another.
Something like:
struct S<A> {
let s: A
init(s: A) {
self.s = s
}
}
extension Array where Element == S<T> {
func getAllS() -> [T] {
return map({ $0.s })
}
}