Use `comparator` instead of `predicate` for sort.