Returns a new set with elements sorted by the given compare function.
compare
Set<E> sorted([int Function(E a, E b)? compare]) { final list = toList()..sort(compare); return Set.from(list); }