Add `tuple_permutations`
There is the combinations() and tuple_combinations() functions, I'm however missing the tuple_permutations() function.
Is there a reason this couldn't exist? If not, I might even be open to implementing it depending on how much macro hackery is needed
It may be easier to add array_permutations() if you want to avoid macro hackery.
That's true and in general probably nicer to use than tuples, thanks for the pointer!
It seems possible to share most of the code from permutations(), similar to the array_combinations() implementation. In that case we probably want to start with:
impl<T> PoolIndex<T> for Box<[usize]> {
type Item = Vec<T>;
...
}
and then make PermutationState generic. (Aside: I'm not sure why PermutationState::Loaded.indices is a Box<[usize]> instead of a Vec<usize>.)
Aside: I'm not sure why
PermutationState::Loaded.indicesis aBox<[usize]>instead of aVec<usize>.
Canonically we use Box<[usize]> if the size stays unchanged.