We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 003a685 commit e885ea7Copy full SHA for e885ea7
Source/Sequence_Extensions.swift
@@ -85,6 +85,16 @@ public extension ISequence /*: ICustomDebugStringConvertible*/ { // 74092: Silve
85
return self.Where() { return try! includeElement($0) }
86
}
87
88
+ public func count(`where` countElement: (T) throws -> Bool) rethrows -> Int {
89
+ var result = 0;
90
+ for i in self {
91
+ if try countElement(i) {
92
+ result++
93
+ }
94
95
+ return result
96
97
+
98
public var first: T? {
99
return self.FirstOrDefault()
100
0 commit comments