> On Aug 17, 2017, at 7:28 PM, Yuta Koshizawa <ko...@koherent.org> wrote: > > 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) }
That is mentioned in Potential Future Directions at the end. It can certainly be done, but it comes with tradeoffs, and it seems better to settle on the design the basic proposal first. -Chris _______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution