reverse function

void reverse (
  1. List list,
  2. [int start = 0,
  3. int end]
)

Reverses a list, or a part of a list, in-place.

Implementation

void reverse(List list, [int start = 0, int end]) {
  end ??= list.length;
  _reverse(list, start, end);
}