Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSwiftgenerics and constraintsSingle-choice MCQ

In a same-type constraint on a generic function, what does `where C1.Element == C2.Element` enforce?

func zipEqualLength<C1: Collection, C2: Collection>( _ a: C1, _ b: C2 ) -> Bool where C1.Element == C2.Element, C1.Element: Equatable { a.elementsEqual(b) }