1313extension Sequence {
1414 /// Just like `Sequence.map` but allows an `async` transform function.
1515 package func asyncMap< T> (
16- @ _inheritActorContext _ transform: @ Sendable ( Element) async throws -> T
16+ _ transform: ( Element ) async throws -> T
1717 ) async rethrows -> [ T ] {
1818 var result : [ T ] = [ ]
1919 result. reserveCapacity ( self . underestimatedCount)
@@ -27,7 +27,7 @@ extension Sequence {
2727
2828 /// Just like `Sequence.flatMap` but allows an `async` transform function.
2929 package func asyncFlatMap< SegmentOfResult: Sequence > (
30- @ _inheritActorContext _ transform: @ Sendable ( Element) async throws -> SegmentOfResult
30+ _ transform: ( Element ) async throws -> SegmentOfResult
3131 ) async rethrows -> [ SegmentOfResult . Element ] {
3232 var result : [ SegmentOfResult . Element ] = [ ]
3333 result. reserveCapacity ( self . underestimatedCount)
@@ -41,7 +41,7 @@ extension Sequence {
4141
4242 /// Just like `Sequence.compactMap` but allows an `async` transform function.
4343 package func asyncCompactMap< T> (
44- @ _inheritActorContext _ transform: @ Sendable ( Element) async throws -> T ?
44+ _ transform: ( Element ) async throws -> T ?
4545 ) async rethrows -> [ T ] {
4646 var result : [ T ] = [ ]
4747
@@ -56,7 +56,7 @@ extension Sequence {
5656
5757 /// Just like `Sequence.map` but allows an `async` transform function.
5858 package func asyncFilter(
59- @ _inheritActorContext _ predicate: @ Sendable ( Element) async throws -> Bool
59+ _ predicate: ( Element ) async throws -> Bool
6060 ) async rethrows -> [ Element ] {
6161 var result : [ Element ] = [ ]
6262
@@ -70,9 +70,7 @@ extension Sequence {
7070 }
7171
7272 /// Just like `Sequence.first` but allows an `async` predicate function.
73- package func asyncFirst(
74- @_inheritActorContext where predicate: @Sendable ( Element) async throws -> Bool
75- ) async rethrows -> Element ? {
73+ package func asyncFirst( where predicate: ( Element ) async throws -> Bool ) async rethrows -> Element ? {
7674 for element in self {
7775 if try await predicate ( element) {
7876 return element
@@ -84,7 +82,7 @@ extension Sequence {
8482
8583 /// Just like `Sequence.contains` but allows an `async` predicate function.
8684 package func asyncContains(
87- @ _inheritActorContext where predicate: @ Sendable ( Element) async throws -> Bool
85+ where predicate: ( Element ) async throws -> Bool
8886 ) async rethrows -> Bool {
8987 return try await asyncFirst ( where: predicate) != nil
9088 }
0 commit comments