previousPermutation method
Permutes this List in-place into the previous permutation with respect
to the provided comparator
. Returns true
if such a permutation
exists, otherwise leaves the list unmodified and returns false
.
Implementation
bool previousPermutation({Comparator<E>? comparator}) =>
nextPermutation(comparator: comparator?.reversed ?? reverseCompare);