Skip to content

Instantly share code, notes, and snippets.

@al3xandru
Created August 27, 2015 05:51
Show Gist options
  • Save al3xandru/16f00099732b9a18667b to your computer and use it in GitHub Desktop.
Save al3xandru/16f00099732b9a18667b to your computer and use it in GitHub Desktop.
// Check out the where clause of the Generic
// Also the `_`
func anyCommonElements <T, U where T: SequenceType, U: SequenceType, T.Generator.Element: Equatable, T.Generator.Element == U.Generator.Element> (lhs: T, _ rhs: U) -> Bool {
}
// should the function be invoked or is this an error
anyCommonElements(["a", "b", "c"], [1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment