pub fn prev_permutation<T: Ord>(a: &mut [T]) -> bool