redo as Array#lexographic_permutations