sortBy is stable, so perhaps we ought to take advantage of that and write semi-readable code.