reverse<E> function
Reverses a list, or a part of a list, in-place.
Implementation
void reverse<E>(List<E> elements, [int start = 0, int? end]) {
end = RangeError.checkValidRange(start, end, elements.length);
_reverse<E>(elements, start, end);
}