nit: suggest to use `permIterator` for the function name.