Hey,

I was interested in adopting the ability for a type that's generic in some 
sense (either via generics or via associated types, in the case of protocols) 
to conform to other protocols conditionally based on its type 
parameter/associated type. For example:

```
extension CollectionType: Equatable where Generator.Element: Equatable {}

func ==<Collection: CollectionType where Collection.Generator.Element: 
Equatable>(left: Collection, right: Collection) -> Bool {
  return zip(left, right).reduce(true) { accumulator, tuple in accumulator && 
(tuple.0 == tuple.1) }
}
```

If this has already been proposed and knocked out/accepted please direct me to 
the right place.
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to