From 60d653f0087f945103f0c23c940c49da7c5ce6cc Mon Sep 17 00:00:00 2001 From: Nate Cook Date: Thu, 8 Oct 2020 18:36:48 -0500 Subject: [PATCH] Fix misspelling in the guides --- Guides/Chain.md | 2 +- Guides/Chunked.md | 2 +- Guides/Combinations.md | 2 +- Guides/Cycle.md | 2 +- Guides/Partition.md | 2 +- Guides/Permutations.md | 2 +- Guides/Product.md | 2 +- Guides/RandomSampling.md | 2 +- Guides/Rotate.md | 2 +- Guides/Unique.md | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Guides/Chain.md b/Guides/Chain.md index fe8aed4..5cdf76f 100644 --- a/Guides/Chain.md +++ b/Guides/Chain.md @@ -41,7 +41,7 @@ the first and second arguments conform. This method’s and type’s name match the term of art used in other languages and libraries. -### Comparison with other langauges +### Comparison with other languages **Rust:** Rust provides a `chain` function that concatenates two iterators. diff --git a/Guides/Chunked.md b/Guides/Chunked.md index 76bc526..d5b7af9 100644 --- a/Guides/Chunked.md +++ b/Guides/Chunked.md @@ -82,7 +82,7 @@ The operation performed by these methods is similar to other ways of breaking a - `sliced`: *Not included in this package or the stdlib.* Breaks a collection into potentially overlapping subsequences. -### Comparison with other langauges +### Comparison with other languages **Ruby:** Ruby’s `Enumerable` class defines `chunk_while` and `chunk`, which map to the proposed `chunked(by:)` and `chunked(on:)` methods. diff --git a/Guides/Combinations.md b/Guides/Combinations.md index 4b47f1c..af2cdff 100644 --- a/Guides/Combinations.md +++ b/Guides/Combinations.md @@ -74,7 +74,7 @@ Swift API guidelines. A few other options were considered: - `k` is used a term of art for combinations and permutations, but isn't widely used in programming contexts. -### Comparison with other langauges +### Comparison with other languages **Rust/Ruby/Python:** Rust, Ruby, and Python all define functions with essentially the same semantics as the method described here. diff --git a/Guides/Cycle.md b/Guides/Cycle.md index e3a5562..2324a91 100644 --- a/Guides/Cycle.md +++ b/Guides/Cycle.md @@ -50,7 +50,7 @@ run-through of elements (the actual semantics) or starting after the first set. This ambiguity is present in all the different potential names for this function: `repeated(times:)`, `cycled(repetitions:)`, etc. -### Comparison with other langauges +### Comparison with other languages **Rust:** The `cycle` method repeats an iterator's elements forever. I don’t see anything that matches the `cycled(times:)` behavior. diff --git a/Guides/Partition.md b/Guides/Partition.md index c8eab23..0b25b2d 100644 --- a/Guides/Partition.md +++ b/Guides/Partition.md @@ -82,7 +82,7 @@ to eventually land in the standard library. `partitioningIndex(where:)` is a slight generalization of a binary search, and is an O(_log n_) operation for random-access collections; O(_n_) otherwise. -### Comparison with other langauges +### Comparison with other languages **C++:** The `` library defines `partition`, `stable_partition`, and `partition_point` functions with similar semantics to these. Notably, in the C++ diff --git a/Guides/Permutations.md b/Guides/Permutations.md index 1740919..6529593 100644 --- a/Guides/Permutations.md +++ b/Guides/Permutations.md @@ -87,7 +87,7 @@ O(_n_) operation. See the ["Naming" section for `combinations(ofCount:)`](Combinations.md#naming) for detail. -### Comparison with other langauges +### Comparison with other languages **C++:** The `` library defines a `next_permutation` function that advances an array of comparable values through their lexicographic orderings. diff --git a/Guides/Product.md b/Guides/Product.md index 397c75a..dcda409 100644 --- a/Guides/Product.md +++ b/Guides/Product.md @@ -58,7 +58,7 @@ collections. While `product` is precedented in other languages, the name has an unfortunate overlap with multiplication, where `product(numbers1, numbers2)` could be seen as producing an element-wise product. -### Comparison with other langauges +### Comparison with other languages **Ruby:** You can call the `product` method on an array, passing one or more arrays to form n-ary tuples — passing a single array gives the same semantics as diff --git a/Guides/RandomSampling.md b/Guides/RandomSampling.md index e244e45..c865c7c 100644 --- a/Guides/RandomSampling.md +++ b/Guides/RandomSampling.md @@ -74,7 +74,7 @@ returns a single random element. The `randomSample(count:)` name is chosen to align with `randomElement`, but be more distinguishable than something like `randomElements`. Other names considered include `sample` and `choose`. -### Comparison with other langauges +### Comparison with other languages **C++:** As of C++17, the `` library includes a `sample` function that provides linear performance. This algorithm is stable for all source diff --git a/Guides/Rotate.md b/Guides/Rotate.md index 96b85d1..bf59918 100644 --- a/Guides/Rotate.md +++ b/Guides/Rotate.md @@ -57,7 +57,7 @@ For the range-based overloads, the label could be omitted. That is, instead of using `subrange:`, the method could be called as `numbers.rotate(0..<3, at: 2)`. -### Comparison with other langauges +### Comparison with other languages **C++:** The `` library defines a `rotate` function with similar semantics to this one. diff --git a/Guides/Unique.md b/Guides/Unique.md index 4b4b64a..0b51686 100644 --- a/Guides/Unique.md +++ b/Guides/Unique.md @@ -38,7 +38,7 @@ extension Sequence { The `uniqued` methods are O(_n_) in both time and space complexity. -### Comparison with other langauges +### Comparison with other languages **C+\+:** The `` library defines a `unique` function that removes consecutive equal elements.