File tree Expand file tree Collapse file tree 3 files changed +13
-15
lines changed Expand file tree Collapse file tree 3 files changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ extension Collection {
138138 /// four colors:
139139 ///
140140 /// let colors = ["fuchsia", "cyan", "mauve", "magenta"]
141- /// for combo in colors.combinations(ofCount k : 3) {
141+ /// for combo in colors.combinations(ofCount: 3) {
142142 /// print(combo.joined(separator: ", "))
143143 /// }
144144 /// // fuchsia, cyan, mauve
Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ extension MutableCollection {
213213 /// rotating.
214214 /// - Returns: The new index of the element that was first pre-rotation.
215215 ///
216- /// - Complexity: O(*n*)
216+ /// - Complexity: O(*n*), where *n* is the length of the collection.
217217 @inlinable
218218 @discardableResult
219219 public mutating func rotate( toStartAt newStart: Index ) -> Index {
@@ -273,7 +273,7 @@ extension MutableCollection where Self: BidirectionalCollection {
273273 /// rotating.
274274 /// - Returns: The new index of the element that was first pre-rotation.
275275 ///
276- /// - Complexity: O(*n*)
276+ /// - Complexity: O(*n*), where *n* is the length of the collection.
277277 @inlinable
278278 @discardableResult
279279 public mutating func rotate( toStartAt newStart: Index ) -> Index {
Original file line number Diff line number Diff line change 1111
1212extension BidirectionalCollection {
1313
14- /// Returns a `SubSequence` formed by discarding all elements at the start and end of the collection
15- /// which satisfy the given predicate.
14+ /// Returns a `SubSequence` formed by discarding all elements at the start and
15+ /// end of the collection which satisfy the given predicate.
1616 ///
17- /// This example uses `trimming(where:)` to get a substring without the white space at the
18- /// beginning and end of the string:
17+ /// This example uses `trimming(where:)` to get a substring without the white
18+ /// space at the beginning and end of the string:
1919 ///
20- /// ```
21- /// let myString = " hello, world "
22- /// print(myString.trimming(where: \.isWhitespace)) // "hello, world"
23- /// ```
20+ /// let myString = " hello, world "
21+ /// print(myString.trimming(where: \.isWhitespace)) // "hello, world"
2422 ///
25- /// - parameters :
26- /// - predicate: A closure which determines if the element should be omitted from the
27- /// resulting slice.
23+ /// - Parameters :
24+ /// - predicate: A closure which determines if the element should be
25+ /// omitted from the resulting slice.
2826 ///
29- /// - complexity: `O(n)` , where `n` is the length of this collection.
27+ /// - Complexity: O(*n*) , where *n* is the length of this collection.
3028 ///
3129 @inlinable
3230 public func trimming(
You can’t perform that action at this time.
0 commit comments