Extending/overwriting sort in range.jl (line 686) sort(r::Range) = issorted(r) ? r : reverse(r)
with the following worked for me. function Base.sort(r::Range; rev::Bool=false) if rev issorted(r) ? reverse(r) : r else issorted(r) ? r : reverse(r) end end