import { permutations } from "https://deno.land/x/itertools@v1.1.1/itertools.ts";
Return successive r
-length permutations of elements in the iterable.
If r
is not specified, then r
defaults to the length of the iterable and
all possible full-length permutations are generated.
Permutations are emitted in lexicographic sort order. So, if the input iterable is sorted, the permutation tuples will be produced in sorted order.
Elements are treated as unique based on their position, not on their value. So if the input elements are unique, there will be no repeat values in each permutation.