diff --git a/Sources/AsyncAlgorithms/AsyncCombineLatest2Sequence.swift b/Sources/AsyncAlgorithms/AsyncCombineLatest2Sequence.swift index 3a58653..9db4d34 100644 --- a/Sources/AsyncAlgorithms/AsyncCombineLatest2Sequence.swift +++ b/Sources/AsyncAlgorithms/AsyncCombineLatest2Sequence.swift @@ -9,10 +9,13 @@ // //===----------------------------------------------------------------------===// +/// Creates an asynchronous sequence that combines the latest values from two `AsyncSequence` types +/// by emitting a tuple of the values. public func combineLatest(_ base1: Base1, _ base2: Base2) -> AsyncCombineLatest2Sequence { AsyncCombineLatest2Sequence(base1, base2) } +/// An `AsyncSequence` that combines the latest values produced from two asynchronous sequences into an asynchronous sequence of tuples. public struct AsyncCombineLatest2Sequence: Sendable where Base1: Sendable, Base2: Sendable, @@ -30,6 +33,7 @@ public struct AsyncCombineLatest2Sequence, Base1.AsyncIterator) diff --git a/Sources/AsyncAlgorithms/AsyncCombineLatest3Sequence.swift b/Sources/AsyncAlgorithms/AsyncCombineLatest3Sequence.swift index a0ee829..e182a43 100644 --- a/Sources/AsyncAlgorithms/AsyncCombineLatest3Sequence.swift +++ b/Sources/AsyncAlgorithms/AsyncCombineLatest3Sequence.swift @@ -9,10 +9,13 @@ // //===----------------------------------------------------------------------===// +/// Creates an asynchronous sequence that combines the latest values from three `AsyncSequence` types +/// by emitting a tuple of the values. public func combineLatest(_ base1: Base1, _ base2: Base2, _ base3: Base3) -> AsyncCombineLatest3Sequence { AsyncCombineLatest3Sequence(base1, base2, base3) } +/// An `AsyncSequence` that combines the latest values produced from three asynchronous sequences into an asynchronous sequence of tuples. public struct AsyncCombineLatest3Sequence: Sendable where Base1: Sendable, Base2: Sendable, Base3: Sendable, @@ -32,6 +35,7 @@ public struct AsyncCombineLatest3Sequence, Base3>.Iterator