Swift “where” Array Extensions
extension Array { func filterWithId<T where T : Idable>(id : String) -> [T] { … } } defines a generic method filterWithId() where the generic placeholder T is restricted to be Idable. But that definition introduces a local placeholder T which is completely unrelated to the array element type T (and hides that in the … Read more