diff --git a/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/BufferedBytes.md b/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/BufferedBytes.md index af57631..308fbc8 100644 --- a/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/BufferedBytes.md +++ b/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/BufferedBytes.md @@ -1,10 +1,10 @@ # AsyncBufferedByteIterator +Provides a highly efficient iterator useful for iterating byte sequences derived from asynchronous read functions. + [[Source](https://github.com/apple/swift-async-algorithms/blob/main/Sources/AsyncAlgorithms/AsyncBufferedByteIterator.swift) | [Tests](https://github.com/apple/swift-async-algorithms/blob/main/Tests/AsyncAlgorithmsTests/TestBufferedByteIterator.swift)] -Provides a highly efficient iterator useful for iterating byte sequences derived from asynchronous read functions. - This type provides infrastructure for creating `AsyncSequence` types with an `Element` of `UInt8` backed by file descriptors or similar read sources. ```swift diff --git a/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Chain.md b/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Chain.md index 190e6c3..2db97f1 100644 --- a/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Chain.md +++ b/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Chain.md @@ -1,5 +1,7 @@ # Chain +Chains two or more asynchronous sequences together sequentially. + [[Source](https://github.com/apple/swift-async-algorithms/blob/main/Sources/AsyncAlgorithms/AsyncChain2Sequence.swift), [Source](https://github.com/apple/swift-async-algorithms/blob/main/Sources/AsyncAlgorithms/AsyncChain3Sequence.swift) | [Tests](https://github.com/apple/swift-async-algorithms/blob/main/Tests/AsyncAlgorithmsTests/TestChain.swift)] diff --git a/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/CombineLatest.md b/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/CombineLatest.md index b481eaa..f1e3655 100644 --- a/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/CombineLatest.md +++ b/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/CombineLatest.md @@ -1,10 +1,10 @@ # Combine Latest +Combines the latest values produced from two or more asynchronous sequences into an asynchronous sequence of tuples. + [[Source](https://github.com/apple/swift-async-algorithms/blob/main/Sources/AsyncAlgorithms/CombineLatest/AsyncCombineLatest2Sequence.swift), [Source](https://github.com/apple/swift-async-algorithms/blob/main/Sources/AsyncAlgorithms/CombineLatest/AsyncCombineLatest3Sequence.swift) | [Tests](https://github.com/apple/swift-async-algorithms/blob/main/Tests/AsyncAlgorithmsTests/TestCombineLatest.swift)] -Combines the latest values produced from two or more asynchronous sequences into an asynchronous sequence of tuples. - ```swift let appleFeed = URL("http://www.example.com/ticker?symbol=AAPL").lines let nasdaqFeed = URL("http://www.example.com/ticker?symbol=^IXIC").lines diff --git a/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Effects.md b/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Effects.md index 82830bb..3d96515 100644 --- a/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Effects.md +++ b/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Effects.md @@ -1,3 +1,7 @@ +# Effects + +Lists the effects of all async algorithms. + | Type | Throws | Sendability | |-----------------------------------------------------|--------------|-------------| | `AsyncAdjacentPairsSequence` | rethrows | Conditional | diff --git a/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Intersperse.md b/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Intersperse.md index 71d827b..fbe775d 100644 --- a/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Intersperse.md +++ b/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Intersperse.md @@ -1,10 +1,10 @@ # Intersperse +Places a given value in between each element of the asynchronous sequence. + [[Source](https://github.com/apple/swift-async-algorithms/blob/main/Sources/AsyncAlgorithms/AsyncInterspersedSequence.swift) | [Tests](https://github.com/apple/swift-async-algorithms/blob/main/Tests/AsyncAlgorithmsTests/TestInterspersed.swift)] -Places a given value in between each element of the asynchronous sequence. - ```swift let numbers = [1, 2, 3].async.interspersed(with: 0) for await number in numbers { diff --git a/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Lazy.md b/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Lazy.md index fe5dda9..a2de67e 100644 --- a/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Lazy.md +++ b/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Lazy.md @@ -1,10 +1,10 @@ # AsyncSyncSequence +v + [[Source](https://github.com/apple/swift-async-algorithms/blob/main/Sources/AsyncAlgorithms/AsyncSyncSequence.swift) | [Tests](https://github.com/apple/swift-async-algorithms/blob/main/Tests/AsyncAlgorithmsTests/TestLazy.swift)] -Converts a non-asynchronous sequence into an asynchronous one. - This operation is available for all `Sequence` types. ```swift diff --git a/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Merge.md b/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Merge.md index edc1842..9b4328c 100644 --- a/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Merge.md +++ b/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Merge.md @@ -1,10 +1,10 @@ # Merge +Merges two or more asynchronous sequences sharing the same element type into one singular asynchronous sequence. + [[Source](https://github.com/apple/swift-async-algorithms/blob/main/Sources/AsyncAlgorithms/Merge/AsyncMerge2Sequence.swift), [Source](https://github.com/apple/swift-async-algorithms/blob/main/Sources/AsyncAlgorithms/Merge/AsyncMerge3Sequence.swift) | [Tests](https://github.com/apple/swift-async-algorithms/blob/main/Tests/AsyncAlgorithmsTests/TestMerge.swift)] -Merges two or more asynchronous sequences sharing the same element type into one singular asynchronous sequence. - ```swift let appleFeed = URL(string: "http://www.example.com/ticker?symbol=AAPL")!.lines.map { "AAPL: " + $0 } let nasdaqFeed = URL(string:"http://www.example.com/ticker?symbol=^IXIC")!.lines.map { "^IXIC: " + $0 } diff --git a/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Zip.md b/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Zip.md index e73e1fd..2c34b4a 100644 --- a/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Zip.md +++ b/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Zip.md @@ -1,10 +1,10 @@ # Zip +Combines the latest values produced from two or more asynchronous sequences into an asynchronous sequence of tuples. + [[Source](https://github.com/apple/swift-async-algorithms/blob/main/Sources/AsyncAlgorithms/Zip/AsyncZip2Sequence.swift), [Source](https://github.com/apple/swift-async-algorithms/blob/main/Sources/AsyncAlgorithms/Zip/AsyncZip3Sequence.swift) | [Tests](https://github.com/apple/swift-async-algorithms/blob/main/Tests/AsyncAlgorithmsTests/TestZip.swift)] -Combines the latest values produced from two or more asynchronous sequences into an asynchronous sequence of tuples. - ```swift let appleFeed = URL(string: "http://www.example.com/ticker?symbol=AAPL")!.lines let nasdaqFeed = URL(string: "http://www.example.com/ticker?symbol=^IXIC")!.lines diff --git a/Sources/AsyncAlgorithms/Dictionary.swift b/Sources/AsyncAlgorithms/Dictionary.swift index c9f14e6..629a771 100644 --- a/Sources/AsyncAlgorithms/Dictionary.swift +++ b/Sources/AsyncAlgorithms/Dictionary.swift @@ -20,8 +20,6 @@ extension Dictionary { /// /// - Parameter keysAndValues: An asynchronous sequence of key-value pairs to use for /// the new dictionary. Every key in `keysAndValues` must be unique. - /// - Returns: A new dictionary initialized with the elements of - /// `keysAndValues`. /// - Precondition: The sequence must not have duplicate keys. @inlinable public init(uniqueKeysWithValues keysAndValues: S) async rethrows diff --git a/Sources/AsyncAlgorithms/Merge/AsyncMerge2Sequence.swift b/Sources/AsyncAlgorithms/Merge/AsyncMerge2Sequence.swift index 7adb060..a705c4a 100644 --- a/Sources/AsyncAlgorithms/Merge/AsyncMerge2Sequence.swift +++ b/Sources/AsyncAlgorithms/Merge/AsyncMerge2Sequence.swift @@ -25,7 +25,7 @@ where return AsyncMerge2Sequence(base1, base2) } -/// An ``Swift/AsyncSequence`` that takes two upstream ``Swift/AsyncSequence``s and combines their elements. +/// An `AsyncSequence` that takes two upstream `AsyncSequence`s and combines their elements. public struct AsyncMerge2Sequence< Base1: AsyncSequence, Base2: AsyncSequence diff --git a/Sources/AsyncAlgorithms/Merge/AsyncMerge3Sequence.swift b/Sources/AsyncAlgorithms/Merge/AsyncMerge3Sequence.swift index 1876b97..f4a15ed 100644 --- a/Sources/AsyncAlgorithms/Merge/AsyncMerge3Sequence.swift +++ b/Sources/AsyncAlgorithms/Merge/AsyncMerge3Sequence.swift @@ -28,7 +28,7 @@ where return AsyncMerge3Sequence(base1, base2, base3) } -/// An ``Swift/AsyncSequence`` that takes three upstream ``Swift/AsyncSequence``s and combines their elements. +/// An `AsyncSequence` that takes three upstream `AsyncSequence`s and combines their elements. public struct AsyncMerge3Sequence< Base1: AsyncSequence, Base2: AsyncSequence,