cl-factoradic
cl-factoradic is a Mathematics/Combinatorics library that implements calculation and iteration of permutations based on the factoradic numbers system.

The project was created by Alexander Kahl as a pet for learning Common Lisp, is implemented almost purely functional and currently lacks documentation but the author still hopes it serves useful to someone.

To demonstrate what this is good for:

CL-USER> (cl-factoradic:dump-string-permutations "foo")
foo
foo
ofo
oof
ofo
oof
NIL

CL-USER> (coerce 
          (cl-factoradic:factoradic-permutation 
           (coerce "foo" 'list) 3) 'string)
"OOF"

For the rest, please use your imagination.

The link to the git repository is available from Github.