docs: public static <T> Set<List<T>> permutations(Iterable<T> self) {
          Set<List<T>> ans = new HashSet<List<T>>();
          PermutationGenerator<T> generator = new PermutationGenerator<T>(self);
          while (generator.hasNext()) {
              ans.add(generator.next());
          }
          return ans;
      }