I think we also need `reasync` like `rethrows`.

    extension Sequence {
        func map<T>(_ transform: (Element) async throws -> T) reasync
rethrows -> [T] { ... }
    }

    let urls: [URL] = ...
    let foos: [Foo] = await try urls.map { await try downloadFoo($0) }

--
Yuta
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to