Add a smattering of brief inline docs for most functions/types (#97)

This commit is contained in:
Philippe Hausler authored and GitHub committed 2022-03-18 15:15:55 -07:00
1 parent d4bdb34283
commit 718d647945
13 files changed
+50

No files matched your search

@@ -9,6 +9,8 @@
//
//===----------------------------------------------------------------------===//
/// Creates an asynchronous sequence that concurrently awaits values from three `AsyncSequence` types
/// by emitting a tuple of the values.
public func zip<Base1: AsyncSequence, Base2: AsyncSequence, Base3: AsyncSequence>(_ base1: Base1, _ base2: Base2, _ base3: Base3) -> AsyncZip3Sequence<Base1, Base2, Base3>
where Base1: Sendable,
Base2: Sendable,
@@ -22,6 +24,8 @@ public func zip<Base1: AsyncSequence, Base2: AsyncSequence, Base3: AsyncSequence
AsyncZip3Sequence(base1, base2, base3)
}
/// An asynchronous sequence that concurrently awaits values from three `AsyncSequence` types
/// by emitting a tuple of the values.
public struct AsyncZip3Sequence<Base1: AsyncSequence, Base2: AsyncSequence, Base3: AsyncSequence>: Sendable
where Base1: Sendable,
Base2: Sendable,
@@ -46,6 +50,7 @@ public struct AsyncZip3Sequence<Base1: AsyncSequence, Base2: AsyncSequence, Base
extension AsyncZip3Sequence: AsyncSequence {
public typealias Element = (Base1.Element, Base2.Element, Base3.Element)
/// The iterator for an `AsyncZip3Sequence` instance.
public struct Iterator: AsyncIteratorProtocol, Sendable {
var base1: Base1.AsyncIterator?
var base2: Base2.AsyncIterator?