xxxxxxxxxx
extension SwappableList<E> on List<E> {
void swap(int first, int second) {
final temp = this[first];
this[first] = this[second];
this[second] = temp;
}
}
final myList = ['a', 'b', 'c', 'd', 'e'];
myList.swap(0, 3);
// [d, b, c, a, e]