Skip to content

Commit aa6349d

Browse files
author
Matt Dickoff
committed
Corrects variable name in max functions to better reflect usage
The variable smallestThree should really be named largestThree. Looks like this was originally a copy paste error from the min documentation.
1 parent 195e031 commit aa6349d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/Algorithms/MinMax.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ extension Sequence {
125125
/// largest values:
126126
///
127127
/// let numbers = [7, 1, 6, 2, 8, 3, 9]
128-
/// let smallestThree = numbers.max(count: 3, sortedBy: <)
128+
/// let largestThree = numbers.max(count: 3, sortedBy: <)
129129
/// // [7, 8, 9]
130130
///
131131
/// If you need to sort a sequence but only need to access its largest
@@ -197,7 +197,7 @@ extension Sequence where Element: Comparable {
197197
/// largest values:
198198
///
199199
/// let numbers = [7, 1, 6, 2, 8, 3, 9]
200-
/// let smallestThree = numbers.max(count: 3)
200+
/// let largestThree = numbers.max(count: 3)
201201
/// // [7, 8, 9]
202202
///
203203
/// If you need to sort a sequence but only need to access its largest
@@ -280,7 +280,7 @@ extension Collection {
280280
/// largest values:
281281
///
282282
/// let numbers = [7, 1, 6, 2, 8, 3, 9]
283-
/// let smallestThree = numbers.max(count: 3, sortedBy: <)
283+
/// let largestThree = numbers.max(count: 3, sortedBy: <)
284284
/// // [7, 8, 9]
285285
///
286286
/// If you need to sort a collection but only need to access its largest

0 commit comments

Comments
 (0)