@@ -100,7 +100,7 @@ public protocol RangeReplaceableIndexable : Indexable {
100
100
/// Inserts a new element into the collection at the specified position.
101
101
///
102
102
/// The new element is inserted before the element currently at the specified
103
- /// index. If you pass the collection's `endIndex` property as the `index `
103
+ /// index. If you pass the collection's `endIndex` property as the `i `
104
104
/// parameter, the new element is appended to the collection.
105
105
///
106
106
/// var numbers = [1, 2, 3, 4, 5]
@@ -115,7 +115,7 @@ public protocol RangeReplaceableIndexable : Indexable {
115
115
///
116
116
/// - Parameters:
117
117
/// - newElement: The new element to insert into the collection.
118
- /// - i: The position at which to insert the new element. `index ` must be a
118
+ /// - i: The position at which to insert the new element. `i ` must be a
119
119
/// valid index into the collection.
120
120
///
121
121
/// - Complexity: O(*n*), where *n* is the length of the collection.
@@ -126,7 +126,7 @@ public protocol RangeReplaceableIndexable : Indexable {
126
126
///
127
127
/// The new elements are inserted before the element currently at the
128
128
/// specified index. If you pass the collection's `endIndex` property as the
129
- /// `index ` parameter, the new elements are appended to the collection.
129
+ /// `i ` parameter, the new elements are appended to the collection.
130
130
///
131
131
/// Here's an example of inserting a range of integers into an array of the
132
132
/// same type:
@@ -141,8 +141,8 @@ public protocol RangeReplaceableIndexable : Indexable {
141
141
///
142
142
/// - Parameters:
143
143
/// - newElements: The new elements to insert into the collection.
144
- /// - i: The position at which to insert the new elements. `index ` must be
145
- /// a valid index of the collection.
144
+ /// - i: The position at which to insert the new elements. `i ` must be a
145
+ /// valid index of the collection.
146
146
///
147
147
/// - Complexity: O(*m*), where *m* is the combined length of the collection
148
148
/// and `newElements`. If `i` is equal to the collection's `endIndex`
@@ -166,9 +166,9 @@ public protocol RangeReplaceableIndexable : Indexable {
166
166
/// Calling this method may invalidate any existing indices for use with this
167
167
/// collection.
168
168
///
169
- /// - Parameter i: The position of the element to remove. `index ` must be
170
- /// a valid index of the collection that is not equal to the collection's
171
- /// end index.
169
+ /// - Parameter i: The position of the element to remove. `i ` must be a valid
170
+ /// index of the collection that is not equal to the collection's end
171
+ /// index.
172
172
/// - Returns: The removed element.
173
173
///
174
174
/// - Complexity: O(*n*), where *n* is the length of the collection.
@@ -374,8 +374,7 @@ public protocol RangeReplaceableCollection
374
374
where S.Iterator.Element == Iterator.Element
375
375
*/
376
376
377
- /// Adds the elements of a sequence or collection to the end of this
378
- /// collection.
377
+ /// Adds the elements of a sequence to the end of this collection.
379
378
///
380
379
/// The collection being appended to allocates any additional necessary
381
380
/// storage to hold the new elements.
@@ -397,10 +396,9 @@ public protocol RangeReplaceableCollection
397
396
398
397
/// Inserts a new element into the collection at the specified position.
399
398
///
400
- /// The new element is inserted before the element currently at the
401
- /// specified index. If you pass the collection's `endIndex` property as
402
- /// the `index` parameter, the new element is appended to the
403
- /// collection.
399
+ /// The new element is inserted before the element currently at the specified
400
+ /// index. If you pass the collection's `endIndex` property as the `i`
401
+ /// parameter, the new element is appended to the collection.
404
402
///
405
403
/// var numbers = [1, 2, 3, 4, 5]
406
404
/// numbers.insert(100, at: 3)
@@ -413,8 +411,8 @@ public protocol RangeReplaceableCollection
413
411
/// collection.
414
412
///
415
413
/// - Parameter newElement: The new element to insert into the collection.
416
- /// - Parameter i: The position at which to insert the new element.
417
- /// `index` must be a valid index into the collection.
414
+ /// - Parameter i: The position at which to insert the new element. `i` must
415
+ /// be a valid index into the collection.
418
416
///
419
417
/// - Complexity: O(*n*), where *n* is the length of the collection.
420
418
mutating func insert( _ newElement: Iterator . Element , at i: Index )
@@ -424,7 +422,7 @@ public protocol RangeReplaceableCollection
424
422
///
425
423
/// The new elements are inserted before the element currently at the
426
424
/// specified index. If you pass the collection's `endIndex` property as the
427
- /// `index ` parameter, the new elements are appended to the collection.
425
+ /// `i ` parameter, the new elements are appended to the collection.
428
426
///
429
427
/// Here's an example of inserting a range of integers into an array of the
430
428
/// same type:
@@ -438,8 +436,8 @@ public protocol RangeReplaceableCollection
438
436
/// collection.
439
437
///
440
438
/// - Parameter newElements: The new elements to insert into the collection.
441
- /// - Parameter i: The position at which to insert the new elements. `index`
442
- /// must be a valid index of the collection.
439
+ /// - Parameter i: The position at which to insert the new elements. `i` must
440
+ /// be a valid index of the collection.
443
441
///
444
442
/// - Complexity: O(*m*), where *m* is the combined length of the collection
445
443
/// and `newElements`. If `i` is equal to the collection's `endIndex`
@@ -462,9 +460,9 @@ public protocol RangeReplaceableCollection
462
460
/// Calling this method may invalidate any existing indices for use with this
463
461
/// collection.
464
462
///
465
- /// - Parameter i: The position of the element to remove. `index ` must be
466
- /// a valid index of the collection that is not equal to the collection's
467
- /// end index.
463
+ /// - Parameter i: The position of the element to remove. `i ` must be a valid
464
+ /// index of the collection that is not equal to the collection's end
465
+ /// index.
468
466
/// - Returns: The removed element.
469
467
///
470
468
/// - Complexity: O(*n*), where *n* is the length of the collection.
@@ -591,8 +589,7 @@ extension RangeReplaceableCollection {
591
589
insert ( newElement, at: endIndex)
592
590
}
593
591
594
- /// Adds the elements of a sequence or collection to the end of this
595
- /// collection.
592
+ /// Adds the elements of a sequence to the end of this collection.
596
593
///
597
594
/// The collection being appended to allocates any additional necessary
598
595
/// storage to hold the new elements.
@@ -622,10 +619,9 @@ extension RangeReplaceableCollection {
622
619
623
620
/// Inserts a new element into the collection at the specified position.
624
621
///
625
- /// The new element is inserted before the element currently at the
626
- /// specified index. If you pass the collection's `endIndex` property as
627
- /// the `index` parameter, the new element is appended to the
628
- /// collection.
622
+ /// The new element is inserted before the element currently at the specified
623
+ /// index. If you pass the collection's `endIndex` property as the `i`
624
+ /// parameter, the new element is appended to the collection.
629
625
///
630
626
/// var numbers = [1, 2, 3, 4, 5]
631
627
/// numbers.insert(100, at: 3)
@@ -638,8 +634,8 @@ extension RangeReplaceableCollection {
638
634
/// collection.
639
635
///
640
636
/// - Parameter newElement: The new element to insert into the collection.
641
- /// - Parameter i: The position at which to insert the new element.
642
- /// `index` must be a valid index into the collection.
637
+ /// - Parameter i: The position at which to insert the new element. `i` must
638
+ /// be a valid index into the collection.
643
639
///
644
640
/// - Complexity: O(*n*), where *n* is the length of the collection.
645
641
public mutating func insert(
@@ -653,7 +649,7 @@ extension RangeReplaceableCollection {
653
649
///
654
650
/// The new elements are inserted before the element currently at the
655
651
/// specified index. If you pass the collection's `endIndex` property as the
656
- /// `index ` parameter, the new elements are appended to the collection.
652
+ /// `i ` parameter, the new elements are appended to the collection.
657
653
///
658
654
/// Here's an example of inserting a range of integers into an array of the
659
655
/// same type:
@@ -667,8 +663,8 @@ extension RangeReplaceableCollection {
667
663
/// collection.
668
664
///
669
665
/// - Parameter newElements: The new elements to insert into the collection.
670
- /// - Parameter i: The position at which to insert the new elements. `index`
671
- /// must be a valid index of the collection.
666
+ /// - Parameter i: The position at which to insert the new elements. `i` must
667
+ /// be a valid index of the collection.
672
668
///
673
669
/// - Complexity: O(*m*), where *m* is the combined length of the collection
674
670
/// and `newElements`. If `i` is equal to the collection's `endIndex`
0 commit comments