Skip to content

Commit 3349489

Browse files
invalidnameChris Adamson
and
Chris Adamson
authored
Light edit of recent doc comments. (apple#98)
Co-authored-by: Chris Adamson <[email protected]>
1 parent 718d647 commit 3349489

6 files changed

+15
-15
lines changed

Sources/AsyncAlgorithms/AsyncJoinedBySeparatorSequence.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
//===----------------------------------------------------------------------===//
1111

1212
extension AsyncSequence where Element: AsyncSequence {
13-
/// Concatenate an `AsyncSequence` of `AsyncSequence` elements with a seperator.
13+
/// Concatenate an `AsyncSequence` of `AsyncSequence` elements with a separator.
1414
@inlinable
1515
public func joined<Separator: AsyncSequence>(separator: Separator) -> AsyncJoinedBySeparatorSequence<Self, Separator> {
1616
return AsyncJoinedBySeparatorSequence(self, separator: separator)
1717
}
1818
}
1919

20-
/// An `AsyncSequence` that concatenates`AsyncSequence` elements with a seperator.
20+
/// An `AsyncSequence` that concatenates `AsyncSequence` elements with a separator.
2121
public struct AsyncJoinedBySeparatorSequence<Base: AsyncSequence, Separator: AsyncSequence>: AsyncSequence where Base.Element: AsyncSequence, Separator.Element == Base.Element.Element {
2222
public typealias Element = Base.Element.Element
2323
public typealias AsyncIterator = Iterator

Sources/AsyncAlgorithms/AsyncRemoveDuplicatesSequence.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ extension AsyncSequence {
2424
return AsyncRemoveDuplicatesSequence(self, predicate: predicate)
2525
}
2626

27-
/// Creates an asynchronous sequence that omits repeated elements by testing them with a predicate.
27+
/// Creates an asynchronous sequence that omits repeated elements by testing them with an error-throwing predicate.
2828
public func removeDuplicates(by predicate: @escaping @Sendable (Element, Element) async throws -> Bool) -> AsyncThrowingRemoveDuplicatesSequence<Self> {
2929
return AsyncThrowingRemoveDuplicatesSequence(self, predicate: predicate)
3030
}
@@ -89,7 +89,7 @@ extension AsyncRemoveDuplicatesSequence: Sendable where Base: Sendable, Base.Ele
8989
extension AsyncRemoveDuplicatesSequence.Iterator: Sendable where Base: Sendable, Base.Element: Sendable, Base.AsyncIterator: Sendable { }
9090

9191

92-
/// An asynchronous sequence that omits repeated elements by testing them with a predicate.
92+
/// An asynchronous sequence that omits repeated elements by testing them with an error-throwing predicate.
9393
public struct AsyncThrowingRemoveDuplicatesSequence<Base: AsyncSequence>: AsyncSequence {
9494
public typealias Element = Base.Element
9595

Sources/AsyncAlgorithms/AsyncThrottleSequence.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@
1010
//===----------------------------------------------------------------------===//
1111

1212
extension AsyncSequence {
13-
/// Create a rate limited `AsyncSequence` by emitting values at most every specified interval.
13+
/// Create a rate-limited `AsyncSequence` by emitting values at most every specified interval.
1414
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
1515
public func throttle<C: Clock, Reduced>(for interval: C.Instant.Duration, clock: C, reducing: @Sendable @escaping (Reduced?, Element) async -> Reduced) -> AsyncThrottleSequence<Self, C, Reduced> {
1616
AsyncThrottleSequence(self, interval: interval, clock: clock, reducing: reducing)
1717
}
1818

19-
/// Create a rate limited `AsyncSequence` by emitting values at most every specified interval.
19+
/// Create a rate-limited `AsyncSequence` by emitting values at most every specified interval.
2020
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
2121
public func throttle<Reduced>(for interval: Duration, reducing: @Sendable @escaping (Reduced?, Element) async -> Reduced) -> AsyncThrottleSequence<Self, ContinuousClock, Reduced> {
2222
throttle(for: interval, clock: .continuous, reducing: reducing)
2323
}
2424

25-
/// Create a rate limited `AsyncSequence` by emitting values at most every specified interval.
25+
/// Create a rate-limited `AsyncSequence` by emitting values at most every specified interval.
2626
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
2727
public func throttle<C: Clock>(for interval: C.Instant.Duration, clock: C, latest: Bool = true) -> AsyncThrottleSequence<Self, C, Element> {
2828
throttle(for: interval, clock: clock) { previous, element in
@@ -34,14 +34,14 @@ extension AsyncSequence {
3434
}
3535
}
3636

37-
/// Create a rate limited `AsyncSequence` by emitting values at most every specified interval.
37+
/// Create a rate-limited `AsyncSequence` by emitting values at most every specified interval.
3838
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
3939
public func throttle(for interval: Duration, latest: Bool = true) -> AsyncThrottleSequence<Self, ContinuousClock, Element> {
4040
throttle(for: interval, clock: .continuous, latest: latest)
4141
}
4242
}
4343

44-
/// A rate limited `AsyncSequence` by emitting values at most every specified interval.
44+
/// A rate-limited `AsyncSequence` by emitting values at most every specified interval.
4545
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
4646
public struct AsyncThrottleSequence<Base: AsyncSequence, C: Clock, Reduced> {
4747
let base: Base

Sources/AsyncAlgorithms/AsyncThrowingChannel.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
//
1010
//===----------------------------------------------------------------------===//
1111

12-
/// A throwing channel for sending elements from on task to another with back pressure.
12+
/// An error-throwing channel for sending elements from on task to another with back pressure.
1313
///
14-
/// The `AsyncThrowingChannel` class is intended to be used as a communication types between tasks., particularly when one task produces values and another task consumes those values. The back pressure applied by `send(_:)`, `fail(_:)` and `finish()` via the suspension/resume ensure that the production of values does not exceed the consumption of values from iteration. Each of these methods suspends after enqueuing the event and is resumed when the next call to `next()` on the `Iterator` is made.
14+
/// The `AsyncThrowingChannel` class is intended to be used as a communication types between tasks, particularly when one task produces values and another task consumes those values. The back pressure applied by `send(_:)`, `fail(_:)` and `finish()` via suspension/resume ensures that the production of values does not exceed the consumption of values from iteration. Each of these methods suspends after enqueuing the event and is resumed when the next call to `next()` on the `Iterator` is made.
1515
public final class AsyncThrowingChannel<Element: Sendable, Failure: Error>: AsyncSequence, Sendable {
1616
/// The iterator for an `AsyncThrowingChannel` instance.
1717
public struct Iterator: AsyncIteratorProtocol, Sendable {

Sources/AsyncAlgorithms/AsyncZip2Sequence.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//===----------------------------------------------------------------------===//
1111

1212
/// Creates an asynchronous sequence that concurrently awaits values from two `AsyncSequence` types
13-
/// by emitting a tuple of the values.
13+
/// and emits a tuple of the values.
1414
public func zip<Base1: AsyncSequence, Base2: AsyncSequence>(_ base1: Base1, _ base2: Base2) -> AsyncZip2Sequence<Base1, Base2>
1515
where Base1: Sendable,
1616
Base2: Sendable,
@@ -22,7 +22,7 @@ public func zip<Base1: AsyncSequence, Base2: AsyncSequence>(_ base1: Base1, _ ba
2222
}
2323

2424
/// An asynchronous sequence that concurrently awaits values from two `AsyncSequence` types
25-
/// by emitting a tuple of the values.
25+
/// and emits a tuple of the values.
2626
public struct AsyncZip2Sequence<Base1: AsyncSequence, Base2: AsyncSequence>: Sendable
2727
where Base1: Sendable,
2828
Base2: Sendable,

Sources/AsyncAlgorithms/AsyncZip3Sequence.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//===----------------------------------------------------------------------===//
1111

1212
/// Creates an asynchronous sequence that concurrently awaits values from three `AsyncSequence` types
13-
/// by emitting a tuple of the values.
13+
/// and emits a tuple of the values.
1414
public func zip<Base1: AsyncSequence, Base2: AsyncSequence, Base3: AsyncSequence>(_ base1: Base1, _ base2: Base2, _ base3: Base3) -> AsyncZip3Sequence<Base1, Base2, Base3>
1515
where Base1: Sendable,
1616
Base2: Sendable,
@@ -25,7 +25,7 @@ public func zip<Base1: AsyncSequence, Base2: AsyncSequence, Base3: AsyncSequence
2525
}
2626

2727
/// An asynchronous sequence that concurrently awaits values from three `AsyncSequence` types
28-
/// by emitting a tuple of the values.
28+
/// and emits a tuple of the values.
2929
public struct AsyncZip3Sequence<Base1: AsyncSequence, Base2: AsyncSequence, Base3: AsyncSequence>: Sendable
3030
where Base1: Sendable,
3131
Base2: Sendable,

0 commit comments

Comments
 (0)