Add distinct_permutations to api.rst