Skip to content

Instantly share code, notes, and snippets.

@guidomb
Created May 25, 2017 17:15
Show Gist options
  • Save guidomb/b313667616612fc3e0c74c02a066dd8b to your computer and use it in GitHub Desktop.
Save guidomb/b313667616612fc3e0c74c02a066dd8b to your computer and use it in GitHub Desktop.
extension Sequence {
func filter<A, B>(_ isIncluded: (A, B) -> Bool) -> Self {
return self.filter { isIncluded($0.0, $0.1) }
}
func filter<A, B, C>(_ isIncluded: (A, B, C) -> Bool) -> Self {
return self.filter { isIncluded($0.0, $0.1, $0.2) }
}
}
// and so on ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment