File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed
Sources/Cadova/Extensions Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,6 @@ extension Sequence {
1414 output.map { function($0, input) } ?? input
1515 }
1616 }
17-
18- func cumulativeCombination(_ function: (Element, Element) -> Element) -> [Element] {
19- reduce([]) {
20- if let last = $0.last { $0 + [function(last, $1)] } else { [$1] }
21- }
22- }
2317}
2418
2519extension Sequence {
@@ -83,20 +77,6 @@ extension Sequence where Element: Sendable {
8377 return results.compactMap { $0 }
8478 }
8579 }
86-
87- @inlinable
88- public func concurrentAsyncForEach(
89- _ operation: @Sendable @escaping (Element) async throws -> Void
90- ) async rethrows {
91- try await withThrowingTaskGroup(of: Void.self) { group in
92- for element in self {
93- group.addTask {
94- try await operation(element)
95- }
96- }
97- try await group.waitForAll()
98- }
99- }
10080}
10181
10282extension Collection where Element: Comparable {
You can’t perform that action at this time.
0 commit comments