Alternatively you could implement sortIdx(..., reverse=true)