Skip to content

Commit 5b5d91c

Browse files
committed
First pass at some documentation for combineLatest
1 parent 4d4022e commit 5b5d91c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Sources/AsyncAlgorithms/AsyncCombineLatest2Sequence.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ public struct AsyncCombineLatest2Sequence<Base1: AsyncSequence, Base2: AsyncSequ
2727
}
2828
}
2929

30+
/// An `AsyncSequence` that combines the latest values produced from two asynchronous sequences into an asynchronous sequence of tuples.
3031
extension AsyncCombineLatest2Sequence: AsyncSequence {
3132
public typealias Element = (Base1.Element, Base2.Element)
3233

34+
/// The iterator for a `AsyncCombineLatest2Sequence` instance.
3335
public struct Iterator: AsyncIteratorProtocol, Sendable {
3436
enum Partial: Sendable {
3537
case first(Result<Base1.Element?, Error>, Base1.AsyncIterator)

Sources/AsyncAlgorithms/AsyncCombineLatest3Sequence.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public func combineLatest<Base1: AsyncSequence, Base2: AsyncSequence, Base3: Asy
1313
AsyncCombineLatest3Sequence(base1, base2, base3)
1414
}
1515

16+
/// An `AsyncSequence` that combines the latest values produced from three asynchronous sequences into an asynchronous sequence of tuples.
1617
public struct AsyncCombineLatest3Sequence<Base1: AsyncSequence, Base2: AsyncSequence, Base3: AsyncSequence>: Sendable
1718
where
1819
Base1: Sendable, Base2: Sendable, Base3: Sendable,
@@ -32,6 +33,7 @@ public struct AsyncCombineLatest3Sequence<Base1: AsyncSequence, Base2: AsyncSequ
3233
extension AsyncCombineLatest3Sequence: AsyncSequence {
3334
public typealias Element = (Base1.Element, Base2.Element, Base3.Element)
3435

36+
/// The iterator for a `AsyncCombineLatest3Sequence` instance.
3537
public struct Iterator: AsyncIteratorProtocol, Sendable {
3638
var iterator: AsyncCombineLatest2Sequence<AsyncCombineLatest2Sequence<Base1, Base2>, Base3>.Iterator
3739

0 commit comments

Comments
 (0)