sorted<M extends IterableResult<T, E> > method
Performs a sort operation and returns a new instance of M.
Implementation
IterableResult<T, E> sorted<M extends IterableResult<T, E>>(
int Function(T a, T b) compare, {
required Iterable<T> Function(Iterable<T>) onSuccess,
}) =>
switch (this) {
Success(:final value) => Success<Iterable<T>, E>(_sort(value, compare)),
final Error<Iterable<T>, E> e => e,
};