Sorter<T> typedef
- T left,
- T right
Takes two values of type T
and computes their sort order, represented by
a returned integer value.
The rules of the comparison are as follows:
- If
left
is less thanright
, a negative number is returned. - If
left
is greater thanright
, a positive number is returned. - If
left
andright
are equal, 0 is returned.
Implementation
typedef Sorter<T> = int Function(T left, T right);