diff --git a/base/sort.jl b/base/sort.jl index 6cdb0048274fc..afde46232cec1 100644 --- a/base/sort.jl +++ b/base/sort.jl @@ -669,7 +669,8 @@ Sort the vector `v` in place. [`QuickSort`](@ref) is used by default for numeric [`MergeSort`](@ref) is used for other arrays. You can specify an algorithm to use via the `alg` keyword (see [Sorting Algorithms](@ref) for available algorithms). The `by` keyword lets you provide a function that will be applied to each element before comparison; the `lt` keyword allows -providing a custom "less than" function; use `rev=true` to reverse the sorting order. These +providing a custom "less than" function (note that for every `x` and `y`, only one of `lt(x,y)` +and `lt(y,x)` can return `true`); use `rev=true` to reverse the sorting order. These options are independent and can be used together in all possible combinations: if both `by` and `lt` are specified, the `lt` function is applied to the result of the `by` function; `rev=true` reverses whatever ordering specified via the `by` and `lt` keywords.