Converts a list to a reversed list.
Example: 1, 2, 3 -> 3, 2, 1
1, 2, 3
3, 2, 1
static List<T> toReversedList<T>(List<T> list) => list.reversed.toList();