We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 667dd2f commit 2ce10e5Copy full SHA for 2ce10e5
.travis.yml
@@ -6,8 +6,7 @@ os:
6
- osx
7
julia:
8
- 1.0
9
- - 1.2
10
- - 1.3
+ - 1
11
- nightly
12
13
notifications:
appveyor.yml
@@ -1,8 +1,7 @@
1
environment:
2
matrix:
3
- julia_version: 1.0
4
- - julia_version: 1.2
5
- - julia_version: 1.3
+ - julia_version: 1
- julia_version: nightly
platform:
src/TupleTools.jl
@@ -240,8 +240,9 @@ function _merge(t1::Tuple, t2::Tuple, lt, by, rev)
240
return (first(t2), _merge(t1, tail(t2), lt, by, rev)...)
241
end
242
243
-_merge(t1::Tuple{}, t2::Tuple, lt, by, rev) = t2
244
-_merge(t1::Tuple, t2::Tuple{}, lt, by, rev) = t1
+_merge(::Tuple{}, t2::Tuple, lt, by, rev) = t2
+_merge(t1::Tuple, ::Tuple{}, lt, by, rev) = t1
245
+_merge(::Tuple{}, ::Tuple{}, lt, by, rev) = ()
246
247
248
"""
@@ -252,7 +253,7 @@ Computes a tuple that contains the permutation required to sort `t`.
252
253
254
sortperm(t::Tuple; lt=isless, by=identity, rev::Bool=false) = _sortperm(t, lt, by, rev)
255
function _sortperm(t::Tuple, lt=isless, by=identity, rev::Bool=false)
- _sort(ntuple(identity, length(t)), lt, i->by(getindex(t, i)), rev)
256
+ map(first, _sort(ntuple(n->(n,by(t[n])), length(t)), lt, last, rev))
257
258
259
0 commit comments