As mentioned in the original proposal for AsyncSequence, it was planned to add a .first
property to consume a single element out of the sequence. Since the language requirement is now satisfied, and Swift 6 is around the corner, should we add it?
extension AsyncSequence {
var first: Element? {
get async throws { try await self.first(where: { _ in true }) }
}
}