Also, the example at http://dlang.org/phobos/std_algorithm.html#nextPermutation is wrong: while (nextPermutation(a)) { } should in fact be do { } while (nextPermutation(a)); as above, or we miss the very first permutation.
Noted. I'll try to fix that in the comming days. Or if anybody else submits the pull, I'll merge it (*hint* *hint*, *wink*)