Skip to content

Instantly share code, notes, and snippets.

@wongzigii
Last active October 4, 2016 15:43
Show Gist options
  • Save wongzigii/809f8e04dae5a21c7070811dbd54bbac to your computer and use it in GitHub Desktop.
Save wongzigii/809f8e04dae5a21c7070811dbd54bbac to your computer and use it in GitHub Desktop.
// Origin from http://mjtsai.com/blog/2016/05/24/swift-tuples-arent-equatable/
extension SequenceType {
/// Returns `true` iff an element in `self` satisfies `predicate`.
@warn_unused_result
public func contains(@noescape predicate: (Self.Generator.Element) throws -> Bool) rethrows -> Bool
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment