mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
first/contains(predicate) => first/contains(where: predicate)
This commit is contained in:
@@ -505,7 +505,7 @@ extension Sequence {
|
||||
/// - Returns: `true` if the sequence contains an element that satisfies
|
||||
/// `predicate`; otherwise, `false`.
|
||||
public func contains(
|
||||
_ predicate: @noescape (${GElement}) throws -> Bool
|
||||
where predicate: @noescape (${GElement}) throws -> Bool
|
||||
) rethrows -> Bool {
|
||||
for e in self {
|
||||
if try predicate(e) {
|
||||
|
||||
Reference in New Issue
Block a user