Skip to content

Commit 5c8bd18

Browse files
authored
Fix a few typos (#329)
* [DOCS] fix typo: precicely → precisely * [DOCS] fix typo: ever → every * [DOCS] fix typo: AsyncBufferSequence, relative
1 parent 2503842 commit 5c8bd18

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

Diff for: Evolution/0006-combineLatest.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
## Introduction
1515

16-
Similar to the `zip` algorithm there is a need to combine the latest values from multiple input asynchronous sequences. Since `AsyncSequence` augments the concept of sequence with the characteristic of time it means that the composition of elements may not just be pairwise emissions but instead be temporal composition. This means that it is useful to emit a new tuple _when_ a value is produced. The `combineLatest` algorithm provides precicely that.
16+
Similar to the `zip` algorithm there is a need to combine the latest values from multiple input asynchronous sequences. Since `AsyncSequence` augments the concept of sequence with the characteristic of time it means that the composition of elements may not just be pairwise emissions but instead be temporal composition. This means that it is useful to emit a new tuple _when_ a value is produced. The `combineLatest` algorithm provides precisely that.
1717

1818
## Detailed Design
1919

Diff for: Evolution/0010-buffer.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ By applying the buffer operator to the previous example, the file can be read as
2828

2929
## Proposed Solution
3030

31-
We propose to extend `AsyncSequence` with a `buffer()` operator. This operator will return an `AsyncBuffereSequence` that wraps the source `AsyncSequence` and handle the buffering mechanism.
31+
We propose to extend `AsyncSequence` with a `buffer()` operator. This operator will return an `AsyncBufferSequence` that wraps the source `AsyncSequence` and handle the buffering mechanism.
3232

3333
This operator will accept an `AsyncBufferSequencePolicy`. The policy will dictate the behaviour in case of a buffer overflow.
3434

@@ -43,7 +43,7 @@ public struct AsyncBufferSequencePolicy: Sendable {
4343
}
4444
```
4545

46-
And the public API of `AsyncBuffereSequence` will be:
46+
And the public API of `AsyncBufferSequence` will be:
4747

4848
```swift
4949
extension AsyncSequence where Self: Sendable {

Diff for: Evolution/0011-interspersed.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -178,23 +178,23 @@ public struct AsyncInterspersedSequence<Base: AsyncSequence> {
178178

179179
@usableFromInline
180180
internal init(_ base: Base, every: Int, separator: Element) {
181-
precondition(every > 0, "Separators can only be interspersed ever 1+ elements")
181+
precondition(every > 0, "Separators can only be interspersed every 1+ elements")
182182
self.base = base
183183
self.separator = .element(separator)
184184
self.every = every
185185
}
186186

187187
@usableFromInline
188188
internal init(_ base: Base, every: Int, separator: @Sendable @escaping () -> Element) {
189-
precondition(every > 0, "Separators can only be interspersed ever 1+ elements")
189+
precondition(every > 0, "Separators can only be interspersed every 1+ elements")
190190
self.base = base
191191
self.separator = .syncClosure(separator)
192192
self.every = every
193193
}
194194

195195
@usableFromInline
196196
internal init(_ base: Base, every: Int, separator: @Sendable @escaping () async -> Element) {
197-
precondition(every > 0, "Separators can only be interspersed ever 1+ elements")
197+
precondition(every > 0, "Separators can only be interspersed every 1+ elements")
198198
self.base = base
199199
self.separator = .asyncClosure(separator)
200200
self.every = every

Diff for: Evolution/NNNN-rate-limits.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
## Introduction
2020

21-
When events can potentially happen faster than the desired consumption rate, there are multiple ways to handle the situation. One approach is to only emit values after a given period of time of inactivity, or "quiescence", has elapsed. This algorithm is commonly referred to as debouncing. A very close reelativee is an apporach to emit values after a given period has elapsed. These emitted values can be reduced from the values encountered during the waiting period. This algorithm is commonly referred to as throttling.
21+
When events can potentially happen faster than the desired consumption rate, there are multiple ways to handle the situation. One approach is to only emit values after a given period of time of inactivity, or "quiescence", has elapsed. This algorithm is commonly referred to as debouncing. A very close relative is an approach to emit values after a given period has elapsed. These emitted values can be reduced from the values encountered during the waiting period. This algorithm is commonly referred to as throttling.
2222

2323
## Proposed Solution
2424

Diff for: Sources/AsyncAlgorithms/Interspersed/AsyncInterspersedSequence.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -157,23 +157,23 @@ public struct AsyncInterspersedSequence<Base: AsyncSequence> {
157157

158158
@usableFromInline
159159
internal init(_ base: Base, every: Int, separator: Element) {
160-
precondition(every > 0, "Separators can only be interspersed ever 1+ elements")
160+
precondition(every > 0, "Separators can only be interspersed every 1+ elements")
161161
self.base = base
162162
self.separator = .element(separator)
163163
self.every = every
164164
}
165165

166166
@usableFromInline
167167
internal init(_ base: Base, every: Int, separator: @Sendable @escaping () -> Element) {
168-
precondition(every > 0, "Separators can only be interspersed ever 1+ elements")
168+
precondition(every > 0, "Separators can only be interspersed every 1+ elements")
169169
self.base = base
170170
self.separator = .syncClosure(separator)
171171
self.every = every
172172
}
173173

174174
@usableFromInline
175175
internal init(_ base: Base, every: Int, separator: @Sendable @escaping () async -> Element) {
176-
precondition(every > 0, "Separators can only be interspersed ever 1+ elements")
176+
precondition(every > 0, "Separators can only be interspersed every 1+ elements")
177177
self.base = base
178178
self.separator = .asyncClosure(separator)
179179
self.every = every
@@ -310,15 +310,15 @@ public struct AsyncThrowingInterspersedSequence<Base: AsyncSequence> {
310310

311311
@usableFromInline
312312
internal init(_ base: Base, every: Int, separator: @Sendable @escaping () throws -> Element) {
313-
precondition(every > 0, "Separators can only be interspersed ever 1+ elements")
313+
precondition(every > 0, "Separators can only be interspersed every 1+ elements")
314314
self.base = base
315315
self.separator = .syncClosure(separator)
316316
self.every = every
317317
}
318318

319319
@usableFromInline
320320
internal init(_ base: Base, every: Int, separator: @Sendable @escaping () async throws -> Element) {
321-
precondition(every > 0, "Separators can only be interspersed ever 1+ elements")
321+
precondition(every > 0, "Separators can only be interspersed every 1+ elements")
322322
self.base = base
323323
self.separator = .asyncClosure(separator)
324324
self.every = every

0 commit comments

Comments
 (0)