@@ -28,12 +28,12 @@ extension Sequence {
28
28
///
29
29
/// If you need to sort a sequence but only need access to a prefix of its
30
30
/// elements, using this method can give you a performance boost over sorting
31
- /// the entire sequence.
31
+ /// the entire sequence.
32
32
///
33
33
/// - Parameter count: The k number of elements to partially sort.
34
34
/// - Parameter areInIncreasingOrder: A predicate that returns true if its
35
35
/// first argument should be ordered before its second argument;
36
- /// otherwise, false.
36
+ /// otherwise, false.
37
37
///
38
38
/// - Complexity: O(k log n)
39
39
public func partiallySorted(
@@ -64,7 +64,7 @@ extension Sequence where Element: Comparable {
64
64
///
65
65
/// If you need to sort a sequence but only need access to a prefix of
66
66
/// its elements, using this method can give you a performance boost over
67
- /// sorting the entire sequence.
67
+ /// sorting the entire sequence.
68
68
///
69
69
/// - Parameter count: The k number of elements to partially sort
70
70
/// in ascending order.
@@ -199,10 +199,11 @@ extension MutableCollection where Self: RandomAccessCollection {
199
199
/// The heap is stored in reverse order, so sifting down will actually
200
200
/// move the element up in the heap.
201
201
///
202
- /// - Parameter i: The element index to sift down
202
+ /// - Parameter i: The element index to sift down.
203
203
/// - Parameter by: The predicate to use when determining the priority
204
- /// of elements in the heap
205
- /// - Parameter heapEndIndex: The index in reverse order, where the heap ends.
204
+ /// of elements in the heap.
205
+ /// - Parameter heapEndIndex: The index, in reverse order,
206
+ /// where the heap ends.
206
207
private mutating func siftDown(
207
208
_ i: Int ,
208
209
by priority: Priority ,
0 commit comments