Conditional Conformance
Making generic types conditionally conform to protocols using where clauses.
Welcome
Conditional conformance lets a generic type conform to a protocol only when its type parameter(s) satisfy certain constraints. This is a cornerstone of Swift's type system expressiveness.
Basic Conditional Conformance
```swift
extension Array: Equatable where Element: Equatable {
// Array is Equatable only when Element is Equatable
}
let a = [1,2,3]
let b = [1,2,3]
print(a == b) // true — works because Int is Equatable
```